Skip to main content

Nokogiri CVE-2025-71407

| EUVDEUVD-2025-210774 CRITICAL
Out-of-bounds Write (CWE-787)
2026-08-25 VulnCheck GHSA-hfqg-gq7v-xwpg
9.3
CVSS 4.0 · Vendor: VulnCheck
Share

Severity by source

Vendor (VulnCheck) PRIMARY
9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vuln.today AI
8.6 HIGH

Remote untrusted input with low complexity and no auth (AV:N/AC:L/PR:N); reliable impact is DoS (A:H) with only potential, unconfirmed code execution, so C:L/I:L rather than H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
X

Lifecycle Timeline

4
Patch available
Aug 25, 2026 - 17:17 EUVD
Source Code Evidence Fetched
Aug 25, 2026 - 16:02 vuln.today
Analysis Generated
Aug 25, 2026 - 16:02 vuln.today
CVE Published
Aug 25, 2026 - 15:15 cve.org
CRITICAL 9.3

DescriptionCVE.org

Nokogiri before 1.18.3 contains a stack buffer overflow vulnerability in libxml2 when reporting DTD validation errors with long QName prefixes, and a use-after-free vulnerability during validation against untrusted XML Schemas. Attackers can trigger these vulnerabilities by providing malicious DTD content or untrusted XSD files to cause denial of service or potential code execution.

AnalysisAI

Memory-corruption denial of service (and potential code execution) affects the Ruby Nokogiri gem before 1.18.3, which bundles a vulnerable libxml2. The flaw combines a stack buffer overflow when libxml2 reports DTD validation errors involving long (~3kb) QName prefixes (CVE-2025-24928) and a use-after-free during validation against untrusted XML Schemas using xsd:keyref with recursively defined types (CVE-2024-56171). Any Ruby/Rails application that validates attacker-supplied DTD or XSD content is exposed; no public exploit identified at time of analysis, and the issue is not in CISA KEV.

Technical ContextAI

Nokogiri is the de-facto XML/HTML parsing library for Ruby, wrapping the native libxml2 C library; it ships its own precompiled copy of libxml2, so the gem version - not the system libxml2 - determines exposure. The root cause is CWE-787 (out-of-bounds write): in libxml2's DTD validation error-reporting code an overly long QName prefix overflows a fixed stack buffer, while a separate defect frees and then reuses memory (use-after-free) while processing identity-constraint (xsd:keyref) relationships in recursively defined schema types. Nokogiri 1.18.3 resolves both by upgrading the vendored libxml2 to v2.13.6, which carries the upstream fixes for CVE-2025-24928 and CVE-2024-56171.

RemediationAI

Vendor-released patch: upgrade Nokogiri to 1.18.3 or later, which bundles libxml2 2.13.6 and closes both CVE-2025-24928 and CVE-2024-56171; update the gem via your Gemfile/bundler and redeploy (see GHSA-vvfq-8hwr-qm4m). If immediate upgrade is not possible, reduce exposure by not parsing or validating untrusted DTDs and XSDs: disable DTD loading/validation on untrusted input (e.g., avoid Nokogiri parse options that enable DTD validation such as DTDVALID/DTDLOAD) and refuse to validate documents against attacker-supplied schema files, accepting only trusted, locally controlled schemas - the trade-off is loss of validation functionality for those inputs. Where feasible, isolate XML parsing in a sandboxed or resource-limited process so a crash degrades gracefully. If your build uses the system libxml2, ensure it is upgraded to 2.13.6+.

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-2025-71406 HIGH
8.7 Aug 25

Use-after-free memory corruption in Nokogiri before 1.18.4 exposes Ruby applications to potential heap corruption and pr

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-2026-79770 HIGH
8.7 Aug 25

Denial-of-service in Nokogiri before 1.19.3 stems from three distinct ReDoS vulnerabilities in the CSS selector tokenize

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-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-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-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

Share

CVE-2025-71407 vulnerability details – vuln.today

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