Description
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.
Published: 2026-08-25
Score: 9.3 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Nokogiri, a widely used XML parsing library for Ruby, contains a stack buffer overflow in libxml2 when reporting DTD validation errors that involve long QName prefixes, and a use‑after‑free during validation against untrusted XML Schemas. An attacker can supply malicious DTD content or untrusted XSD files to the library, which can trigger a denial of service or potentially uncontrolled code execution, depending on the environment.

Affected Systems

The affected product is the Nokogiri library, maintained by Sparklemotion. Versions earlier than 1.18.3 are impacted; applications that depend on any of these versions are vulnerable. The vulnerability is present in any environment where the library performs DTD validation or schema validation on input that could be supplied by an attacker.

Risk and Exploitability

The CVSS score is 9.3, indicating a critical severity. EPSS data is not available, so the current probability of exploitation is unknown, but the absence of an EPSS score does not reduce the inherent risk. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is through any component that loads XML, DTD, or XSD data from an external source, prompting the library to perform validation. If such processing occurs in a privileged context or the application trusts the data, the stack overflow or use‑after‑free can lead to remote code execution. Applications that cannot mitigate these checks at runtime are at high risk.

Generated by OpenCVE AI on August 25, 2026 at 16:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Nokogiri to version 1.18.3 or later.
  • If an upgrade is not immediately possible, disable DTD processing and schema validation for any XML that originates from an untrusted source to prevent the trigger of the vulnerability.
  • For critical applications, implement input sanitization to reject or limit excessively long QName prefixes prior to passing data to Nokogiri.

Generated by OpenCVE AI on August 25, 2026 at 16:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 25 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Nokogiri before 1.18.3 Stack Buffer Overflow and Use-After-Free
First Time appeared Nokogiri
Nokogiri nokogiri
Weaknesses CWE-787
CPEs cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:*:*:*
Vendors & Products Nokogiri
Nokogiri nokogiri
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': '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'}


Subscriptions

Nokogiri Nokogiri
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T16:10:55.763Z

Reserved: 2026-07-18T12:38:41.077Z

Link: CVE-2025-71407

cve-icon Vulnrichment

Updated: 2026-08-25T16:10:52.589Z

cve-icon NVD

Status : Received

Published: 2026-08-25T16:16:45.633

Modified: 2026-08-25T16:16:45.633

Link: CVE-2025-71407

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T16:30:06Z

Weaknesses