CVE Catalog

CVE-2024-58378

CriticalCVSS 9.8
Published: Translated: NVD NIST

Summary

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.

Risk Assessment

The vulnerability may lead to application crashes or potential code execution when processing malicious XML documents, posing a threat to system stability and security.

Recommendation

It is recommended to upgrade Nokogiri to version 1.15.6 or 1.16.2 (depending on the branch used) and avoid processing untrusted XML documents with DTD validation and XInclude enabled.

Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS