Severity by source
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
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.
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
Lifecycle Timeline
4DescriptionCVE.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+.
Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 8.2), this vulnerability is remotely
A command injection vulnerability in Nokogiri v1.10.3 and earlier allows commands to be executed in a subprocess via Rub
Use-after-free memory corruption in Nokogiri before 1.18.4 exposes Ruby applications to potential heap corruption and pr
Out-of-bounds memory read in Nokogiri (CRuby) versions before 1.19.4 crashes the host Ruby process when application code
Denial-of-service in Nokogiri before 1.19.3 stems from three distinct ReDoS vulnerabilities in the CSS selector tokenize
Heap-based buffer under-read in libxml2's XML Schema identity constraint processor affects all Nokogiri releases prior t
Nokogiri is an open source XML and HTML library for the Ruby programming language. Rated high severity (CVSS 7.5), this
Nokogiri is an open source XML and HTML library for Ruby. Rated high severity (CVSS 7.5), this vulnerability is remotely
Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated high sever
Unchecked return value in Nokogiri's CRuby extension (versions 1.5.1 through 1.19.0) causes the `canonicalize` method to
Heap memory leaks in Nokogiri's XSLT transform method (versions before 1.19.3) enable gradual denial of service against
Out-of-bounds read in Nokogiri's `NodeSet#[]` method (all versions before 1.19.4) enables an attacker who can supply a l
Same weakness CWE-787 – Out-of-bounds Write
View allSame technique Memory Corruption
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2025-210774
GHSA-hfqg-gq7v-xwpg