Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted XML or attacker-influenced XSD to validation endpoint
-
ExploitTrigger xmlSchemaIDCFillNodeTables with xsd:keyref and recursive identity constraints
-
ExecutionHeap-based buffer under-read in libxml2
-
ImpactApplication process crash or denial of service
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection 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 application invoke Nokogiri's XML Schema validation in one of two specific configurations: (1) the application validates any XML document against an attacker-controlled or attacker-influenced XSD schema file - meaning the attacker can supply or tamper with the .xsd used for validation; or (2) the application validates attacker-supplied XML documents against a trusted, operator-controlled schema that already contains xsd:keyref in combination with recursively defined complex types that carry additional identity constraints - a non-default, purpose-specific schema design. Applications that perform no XSD schema validation, or that validate only against fully trusted schemas not using this xsd:keyref-plus-recursive-type pattern, are not exploitable. The CVSS 4.0 vector (PR:N) and MITRE's CVSS 3.1 vector (AV:L/AC:H) are in direct conflict - authentication requirements and attack vector cannot be stated with confidence from the available data. The specific schema feature combination required (xsd:keyref plus recursive types with identity constraints) constitutes a meaningful exploitation barrier not captured by the NVD score. |
| Impact | The available risk signals for this vulnerability are materially conflicting and require explicit reconciliation. The NVD-assigned CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:N/VA:H) implies a network-reachable, low-complexity, unauthenticated denial-of-service - a framing that would suggest urgency across virtually any deployment. However, MITRE's independent CVSS 3.1 assessment is 2.9 LOW (AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L), which characterizes the attack as locally constrained and high-complexity - a drastically different posture. The upstream libxml2 maintainer explicitly supports the low-severity reading, noting that exploitation requires the narrow combination of xsd:keyref, recursively defined types, and additional identity constraints. No CISA KEV listing exists, no EPSS data is available in the supplied intelligence, and no public exploit code has been identified. The realistic threat surface is narrow: only applications that perform XSD schema validation against attacker-influenced schemas or attacker-controlled XML documents meeting the specific structural requirements are exposed. The CVSS 4.0 score appears to reflect a worst-case library-level framing rather than the constrained real-world trigger conditions described by the maintainer. Defenders should treat this as a routine patch-cycle update rather than an emergency response item, while prioritizing upgrade for any pipeline that validates untrusted XSD schemas. |
| Exploit ScenarioDerived | An attacker submits a crafted XSD schema or a specially structured XML document to a Ruby application that uses Nokogiri's XML Schema validation - for example, an API endpoint that accepts XML payloads and validates them. If the schema in use includes xsd:keyref references targeting recursively defined complex types with additional identity constraints, the crafted input drives libxml2's xmlSchemaIDCFillNodeTables into a heap-based buffer under-read, potentially crashing the application worker process and causing denial of service. No public exploit code is known at time of analysis, and the high attack complexity (requiring specific schema structural conditions) substantially limits opportunistic exploitation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
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.
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.
Affected VersionsENISA
Affected Packages
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 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.
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
Sources disagree (Low–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
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.
vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.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.
Executive ViewAI
Nokogiri versions prior to 1.18.8 contain a heap buffer vulnerability in XML schema validation that could enable data disclosure or denial of service when processing untrusted XML documents with specific constraint combinations. Organizations relying on Nokogiri for XML parsing should prioritize inventory and upgrade planning, though current risk is mitigated by the requirement for maliciously crafted schemas and low confirmed exploitability.
Vendor-released patch: Nokogiri 1.18.8 and later. Interim mitigations include: restricting XML schema processing to pre-vetted, documented schemas; disabling automatic schema discovery and remote schema loading; and validating all XSD inputs against a whitelist of approved schemas before instantiation.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Denial-of-service in Nokogiri before 1.19.3 stems from three distinct ReDoS vulnerabilities in the CSS selector tokenize
Out-of-bounds memory read in Nokogiri (CRuby) versions before 1.19.4 crashes the host Ruby process when application code
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
Heap memory leaks in Nokogiri's XSLT transform method (versions before 1.19.3) enable gradual denial of service against
Unchecked return value in Nokogiri's CRuby extension (versions 1.5.1 through 1.19.0) causes the `canonicalize` method to
Out-of-bounds read in Nokogiri's `NodeSet#[]` method (all versions before 1.19.4) enables an attacker who can supply a l
Nokogiri is a Rubygem providing HTML, XML, SAX, and Reader parsers with XPath and CSS selector support. Rated medium sev
NONET network restriction bypass in Nokogiri's JRuby implementation permits external resource fetching during XML Schema
EUVD-2025-210772
GHSA-2ph4-3vr8-f2m3
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB