Severity by source
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/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
Network-reachable via application input layer but AC:H due to required xsd:keyref/recursive-type schema structure; availability impact only, low severity consistent with MITRE assessment.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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/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.8 packages a vulnerable version of libxml2 (before 2.13.8) that contains a heap-based buffer under-read (CVE-2025-32415) in the xmlSchemaIDCFillNodeTables function in xmlschemas.c. The issue can be triggered when validating against an untrusted XML Schema, or when validating untrusted documents against trusted schemas that use xsd:keyref in combination with recursively defined types that have additional identity constraints. Upstream and MITRE rate this issue as low severity.
AnalysisAI
Heap-based buffer under-read in libxml2's XML Schema identity constraint processor affects all Nokogiri releases prior to 1.18.8, which bundle the vulnerable libxml2 library. The flaw in xmlSchemaIDCFillNodeTables can be triggered by supplying a crafted XSD schema or by submitting untrusted XML documents for validation against trusted schemas that combine xsd:keyref with recursively defined types carrying additional identity constraints. No public exploit has been identified at time of analysis, and upstream libxml2 maintainers and MITRE independently rate actual exploitability as low - in notable conflict with the NVD-assigned CVSS 4.0 base score of 8.7.
Technical ContextAI
Nokogiri is a widely used Ruby gem for XML and HTML parsing that bundles libxml2 as a native compiled dependency. The vulnerability - separately tracked as CVE-2025-32415 in the libxml2 project - is a CWE-125 (Out-of-Bounds Read) heap-based buffer under-read occurring in the xmlSchemaIDCFillNodeTables function within libxml2's xmlschemas.c. This function constructs internal lookup tables during XML Schema Definition (XSD) identity constraint validation, processing constructs such as xsd:keyref, xsd:key, and xsd:unique. The under-read is triggered when the schema contains xsd:keyref references in combination with recursively defined complex types that themselves carry additional identity constraints - causing the function to compute an incorrect buffer index. The affected CPE is cpe:2.3:a:sparklemotion:nokogiri:*:*:*:*:*:*:*:* for all versions below 1.18.8. Nokogiri installations that use system-provided libxml2 instead of the bundled version are only affected if the system libxml2 is itself below 2.13.8.
RemediationAI
The vendor-released patch is Nokogiri 1.18.8, which upgrades the bundled libxml2 to v2.13.8 and resolves CVE-2025-32415. Upgrade via 'gem update nokogiri' or pin 'gem "nokogiri", ">= 1.18.8"' in the Gemfile and run 'bundle update nokogiri'. The fix is confirmed in the vendor advisory at https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5w6v-399v-w3cc. As a compensating control prior to upgrading, applications can avoid passing untrusted, attacker-influenced XSD files as the schema argument to Nokogiri's validation methods - this eliminates the primary high-risk triggering condition. A secondary workaround is to disable XML Schema validation entirely for untrusted input and rely on application-layer validation instead, though this carries the trade-off of losing schema-enforced structural guarantees. Switching to a system-provided libxml2 package (if already updated to 2.13.8+) is viable but introduces a system-dependency management burden and may not be available on all deployment targets.
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
Memory-corruption denial of service (and potential code execution) affects the Ruby Nokogiri gem before 1.18.3, which bu
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
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-125 – Out-of-bounds Read
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2025-210772
GHSA-2ph4-3vr8-f2m3