CVE-2024-58378
Published:August 25, 2026
Updated:August 27, 2026
Nokogiri before 1.15.6 and 1.16.x before 1.16.2 (CRuby, when using the packaged libxml2) is affected by a use-after-free vulnerability in libxml2 (CVE-2024-25062) in the xmlTextReader module, which underlies Nokogiri::XML::Reader. When using the XML Reader interface with DTD validation and XInclude expansion enabled, processing a crafted XML document can lead to an xmlValidatePopElement use-after-free. Nokogiri 1.15.6 and 1.16.2 resolve this by upgrading the packaged libxml2 to 2.11.7 and 2.12.5 respectively. JRuby and installations using system libxml2 are not affected.
Affected Packages
https://github.com/sparklemotion/nokogiri.git (GITHUB):
Affected version(s) >=v1.16.0 <v1.16.2Fix Suggestion:
Update to version v1.16.2https://github.com/sparklemotion/nokogiri.git (GITHUB):
Affected version(s) >=v1.4.4 <v1.15.6Fix Suggestion:
Update to version v1.15.6nokogiri (RUBY):
Affected version(s) >=1.0.0 <1.15.6Fix Suggestion:
Update to version 1.15.6nokogiri (RUBY):
Affected version(s) >=1.16.0 <1.16.2Fix Suggestion:
Update to version 1.16.2Related Resources (12)
Do you need more information?
Contact UsCVSS v4
Base Score:
9.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
9.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Use After Free
EPSS
Base Score:
0.34