Skip to main content

Nokogiri CVE-2026-79770

| EUVDEUVD-2026-65528 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted CSS selector via HTTP request
  2. Delivery
    Application passes input to Node#css or equivalent
  3. Exploit
    CSS tokenizer evaluates adversarial regex pattern
  4. Execution
    Exponential backtracking exhausts CPU
  5. Persist
    Application thread hangs or times out
  6. Impact
    Denial of service to concurrent users

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application passes attacker-controlled text directly into one of the affected CSS selector methods: Nokogiri::CSS.xpath_for, Node#css, Node#at_css, Searchable#search, or CSS::Parser#parse. Applications that construct all CSS selectors from developer-authored strings are not exploitable regardless of Nokogiri version. Three distinct input classes trigger the vulnerability: unterminated quoted strings in CSS string literals, hex-escape-rich strings in CSS string literals, and hex-escape-rich strings in CSS identifiers. Exploitation requires no authentication (CVSS PR:N) and no user interaction - any network-accessible endpoint that accepts user input funneled into a selector method is a valid attack surface. No non-default Nokogiri configuration is required; the vulnerable tokenizer is active in all default deployments.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H, score 8.7) indicates a network-exploitable, low-complexity, unauthenticated attack with high availability impact, consistent with the vendor's own CVSS 3.1 assessment of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) - the difference reflects the CVSS 4.0 scoring scale rather than a substantive disagreement. No EPSS score was provided in the source intelligence and cannot be cited. This CVE does not appear in the CISA KEV catalog, and no public exploit code has been identified, so exploitation status is unconfirmed. Despite high CVSS scoring, real-world exploitability is gated on one significant condition: the application must pass attacker-controlled text into a Nokogiri CSS selector method - applications using only developer-authored selectors are not exposed, which substantially narrows the affected population. However, web scrapers, HTML sanitizers, and applications with user-facing search or filtering features commonly fall into the exposed category, and crafting a ReDoS payload for known backtracking patterns requires minimal technical skill once the vulnerability class is understood, so exposed surfaces should be patched without delay. There is no confidentiality or integrity impact; this is a pure availability threat.

Exploit ScenarioDerived

An attacker submits a crafted CSS selector - such as a deeply hex-escaped identifier or an unterminated quoted string - through an application feature that passes user input to a Nokogiri CSS selector method such as Node#css. The Ruby regex engine enters exponential backtracking, consuming 100% CPU for an extended period or until a process-level timeout, denying service to concurrent users. No public exploit code has been identified at time of analysis, but constructing a ReDoS payload for known backtracking patterns is a well-documented technique requiring no specialized tooling.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 25, 2026

Denial-of-service in Nokogiri before 1.19.3 stems from three distinct ReDoS vulnerabilities in the CSS selector tokenizer, affecting string-literal and identifier tokenization. Any Ruby application passing attacker-controlled input to Node#css, Node#at_css, Nokogiri::CSS.xpath_for, Searchable#search, or CSS::Parser#parse is vulnerable to exponential regex backtracking that can exhaust CPU resources and deny service. No public exploit code has been identified at time of analysis, but the unauthenticated network attack surface and low exploitation complexity make this a high-priority patch target for Nokogiri-dependent Ruby applications.

RemediationAI

Vendor-released patch: Nokogiri 1.19.3. Upgrade via gem update nokogiri or constrain the Gemfile with gem 'nokogiri', '>= 1.19.3' and run bundle update nokogiri. The vendor advisory is at https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-c4rq-3m3g-8wgx. For applications unable to upgrade immediately, two compensating controls are available: (1) Audit and restrict all code paths that pass user-supplied or external input into CSS selector methods (Node#css, Node#at_css, Nokogiri::CSS.xpath_for, Searchable#search, CSS::Parser#parse) - applications that exclusively use developer-authored selectors are not exploitable; this control requires a code audit and may miss indirect injection paths. (2) On Ruby 3.2+ or JRuby 9.4+, set Regexp.timeout globally (e.g., Regexp.timeout = 1.0) to bound regex execution time; this limits DoS impact but will raise Regexp::TimeoutError on benign complex inputs as well, requiring callers to handle that exception, and is unavailable on older Ruby runtimes.

Affected VersionsENISA

nokogiri 0 <1.19.3

Affected Packages

rubygems nokogiri fix: 1.19.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Nokogiri (cpe:2.3:a:sparklemotion:nokogiri) is the dominant HTML and XML parsing library for Ruby, widely used in Rails-based web applications and scraping tooling. The vulnerability class is CWE-1333 (Inefficient Regular Expression Complexity): the tokenizer's regex patterns for CSS selectors exhibit catastrophic exponential backtracking under adversarial input. Three attack surfaces were identified in the advisory: (1) the string-literal tokenizer fails on unterminated quoted strings, (2) the string-literal tokenizer fails on input with dense hex escape sequences, and (3) the identifier tokenizer also fails on hex-escape-rich input. Ruby and JRuby use backtracking NFA-based regex evaluation and are therefore susceptible. Ruby 3.2+ and JRuby 9.4+ support a global Regexp.timeout setting that can bound execution time as a compensating control.

Know when Nokogiri gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-delivered unauthenticated input triggers CPU exhaustion with no scope change; no confidentiality or integrity impact applies.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE 6.2 MEDIUM
AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 17:17 EUVD
CVE Published
Aug 25, 2026 - 15:16 cve.org
HIGH 8.7

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Nokogiri versions before 1.19.3 contain denial-of-service vulnerabilities in CSS selector processing that can crash or hang Ruby applications accepting attacker-controlled input. Any organization running Ruby applications that parse user-supplied CSS selectors-including web applications, data processing systems, and content management platforms-faces immediate service disruption risk. Patching is currently not available, making rapid mitigation implementation critical.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Implement strict input validation to restrict CSS selector syntax to known-safe patterns, enforce hard timeouts (maximum 5 seconds) on CSS parsing operations to prevent resource exhaustion, deploy rate limiting on endpoints accepting CSS selector input, and consider disabling user-controlled CSS selector functionality where business requirements permit. Web application firewall rules designed to detect ReDoS attack patterns in CSS input can provide additional detection.

Threat Intelligence Overview

EPSS Score
0.3%
Top 80% exploitable
Prevalence
High
most-downloaded Ruby gem, core to Rails HTML processing
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD 🇯🇵JVN NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2022-29181 HIGH POC
8.2 May 20

Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 8.2), this vulnerability is remotely

CVE-2019-5477 CRITICAL
9.8 Aug 16

A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Rub

CVE-2026-79769 HIGH
8.7 Aug 25

Out-of-bounds memory read in Nokogiri (CRuby) versions before 1.19.4 crashes the host Ruby process when application code

CVE-2025-71346 HIGH
8.7 Aug 25

Heap-based buffer under-read in libxml2's XML Schema identity constraint processor affects all Nokogiri releases prior t

CVE-2022-23476 HIGH
7.5 Dec 08

Nokogiri is an open source XML and HTML library for the Ruby programming language. Rated high severity (CVSS 7.5), this

CVE-2022-24836 HIGH
7.5 Apr 11

Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 7.5), this vulnerability is remotely

CVE-2021-41098 HIGH
7.5 Sep 27

Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated high sever

CVE-2026-79771 MEDIUM
6.9 Aug 25

Heap memory leaks in Nokogiri's XSLT transform method (versions before 1.19.3) enable gradual denial of service against

CVE-2026-79772 MEDIUM
6.9 Aug 25

Unchecked return value in Nokogiri's CRuby extension (versions 1.5.1 through 1.19.0) causes the `canonicalize` method to

CVE-2026-57235 MEDIUM
6.3 Jun 25

Out-of-bounds read in Nokogiri's `NodeSet#[]` method (all versions before 1.19.4) enables an attacker who can supply a l

CVE-2020-26247 MEDIUM
4.3 Dec 30

Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated medium sev

CVE-2026-57234 LOW
2.6 Jun 25

NONET network restriction bypass in Nokogiri's JRuby implementation permits external resource fetching during XML Schema

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 15 SP7 Not-Affected
SUSE Linux Enterprise High Availability Extension 16.0 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy