<Vulnerability name="CVE-2026-79770">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-08-25T15:16:03</PublicDate>
    <Bugzilla id="2523562" url="https://bugzilla.redhat.com/show_bug.cgi?id=2523562" xml:lang="en:us">
nokogiri: Nokogiri: Denial of Service via crafted CSS selectors
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.5</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-1333</CWE>
    <Details xml:lang="en:us" source="Mitre">
Nokogiri versions before 1.19.3 contain regular expression denial of service vulnerabilities in the CSS selector tokenizer affecting string-literal and identifier tokenization. Attackers can inject adversarial CSS selectors into methods like Node#css, Node#at_css, and Searchable#search to cause exponential regex backtracking and denial of service.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Nokogiri. A remote attacker can inject specially crafted CSS selectors into methods such as `Node#css` or `Node#at_css`. This injection can lead to regular expression denial of service (ReDoS) due to exponential regex backtracking, causing the application to become unresponsive.
    </Details>
    <Statement xml:lang="en:us">
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in Nokogiri's CSS selector tokenizer. When processing untrusted user input passed to methods like Node#css, Node#at_css, or Searchable#search, an attacker can inject adversarial CSS selectors containing malicious string literals or identifiers. This triggers exponential regex backtracking within the parser, causing severe CPU exhaustion and leading to a Denial of Service (DoS) for the application thread.
    </Statement>
    <Mitigation xml:lang="en:us">
Do not pass untrusted user input directly into Nokogiri CSS search methods. If dynamic querying is necessary, sanitize input or restrict query parameter patterns before evaluation.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:red_hat_3scale_amp:2">
        <ProductName>Red Hat 3scale API Management Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>3scale-amp2/backend-rhel8</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:red_hat_3scale_amp:2">
        <ProductName>Red Hat 3scale API Management Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>3scale-amp2/system-rhel8</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:red_hat_3scale_amp:2">
        <ProductName>Red Hat 3scale API Management Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>3scale-amp2/system-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:red_hat_3scale_amp:2">
        <ProductName>Red Hat 3scale API Management Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>3scale-amp2/toolbox-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:red_hat_3scale_amp:2">
        <ProductName>Red Hat 3scale API Management Platform 2</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>3scale-amp2/zync-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:satellite:6">
        <ProductName>Red Hat Satellite 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>tfm-rubygem-amazing_print</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:satellite:6">
        <ProductName>Red Hat Satellite 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>tfm-rubygem-graphql</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-79770
https://nvd.nist.gov/vuln/detail/CVE-2026-79770
https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-c4rq-3m3g-8wgx
https://www.vulncheck.com/advisories/nokogiri-before-redos-via-css-selector-tokenizer
    </References>
</Vulnerability>