CVE-2025-71407: Nokogiri before 1.18.3 Stack Buffer Overflow and Use-After-Free
Rejected reason: This CVE ID has been rejected as a duplicate.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
nokogirito a version that resolves this vulnerability.Fixed in 1.18.3 - Compensating control
Ensure DTD content and XSD files supplied to Nokogiri are trusted; do not process untrusted DTD or XSD inputs.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using Nokogiri versions earlier than 1.18.3 are exposed if they process attacker-controlled DTD content or validate XML using untrusted XSD files.
What must an attacker be able to provide to exploit it?
An attacker needs to supply malicious DTD content with long QName prefixes, or an untrusted XML Schema used during validation. No privileges or user interaction are required according to the provided severity vector.
Are all Nokogiri uses affected?
The described attack paths depend on DTD validation error reporting or validation against untrusted XML Schemas. The provided data does not establish exposure for applications that do not perform those operations on untrusted input.
What is the immediate mitigation if upgrading is not possible?
Do not accept or process untrusted DTD content, and avoid validating documents against untrusted XSD files. These measures remove the attacker-controlled inputs identified as triggers.