Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. nokogiri
  4. ›
  5. GHSA-c4rq-3m3g-8wgx

GHSA-c4rq-3m3g-8wgx: Nokogiri CSS selector tokenizer has regular expression backtracking

May 6, 2026 (updated September 2, 2026)

Nokogiri’s CSS selector tokenizer contains regular expressions whose construction may result in exponential regex backtracking on adversarial selectors. Three ReDoS vectors are addressed in this release:

  1. String-literal tokenization on certain unterminated quoted-string input.
  2. String-literal tokenization on a separate class of hex-escape-rich input.
  3. Identifier tokenization on hex-escape-rich input.

The public CSS selector methods that funnel through the affected tokenizer are Nokogiri::CSS.xpath_for, Node#css, Node#at_css, Searchable#search, and CSS::Parser#parse.

References

  • github.com/advisories/GHSA-c4rq-3m3g-8wgx
  • github.com/sparklemotion/nokogiri/security/advisories/GHSA-c4rq-3m3g-8wgx
  • nvd.nist.gov/vuln/detail/CVE-2026-79770
  • www.vulncheck.com/advisories/nokogiri-before-redos-via-css-selector-tokenizer

Code Behaviors & Features

Detect and mitigate GHSA-c4rq-3m3g-8wgx with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.19.3

Fixed versions

  • 1.19.3

Solution

Upgrade to version 1.19.3 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity

Source file

gem/nokogiri/GHSA-c4rq-3m3g-8wgx.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:34 +0000.