Skip to main content

Nokogiri CVE-2025-71346

| EUVDEUVD-2025-210772 HIGH
Out-of-bounds Read (CWE-125)
2026-08-25 VulnCheck GHSA-2ph4-3vr8-f2m3
8.7
CVSS 4.0 · Vendor: VulnCheck
Share

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/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
3.7 LOW

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.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/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: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
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:01 vuln.today
Analysis Generated
Aug 25, 2026 - 16:01 vuln.today
CVE Published
Aug 25, 2026 - 15:15 cve.org
HIGH 8.7

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

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-71407 CRITICAL
9.3 Aug 25

Memory-corruption denial of service (and potential code execution) affects the Ruby Nokogiri gem before 1.18.3, which bu

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-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-71346 vulnerability details – vuln.today

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