CVE-2024-58378: Nokogiri before 1.16.2 Use-After-Free via xmlTextReader

Published Aug 25, 2026
·
Updated

Rejected reason: This CVE ID has been rejected as a duplicate.

Affected Software

6 affected components
pypi/Nokogiri
nokogiri/nokogiri>0<=1.15.5, >1.16.0<=1.16.1
ruby/nokogiri<1.15.6, >1.16.0<1.16.2
Nokogiri libxml2=2.11.7, =2.12.5
Nokogiri Nokogiri Ruby<1.15.6
Nokogiri Nokogiri Ruby>=1.16.0<1.16.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Nokogiri to a version that resolves this vulnerability.

    Fixed in 1.15.6
  2. Upgrade

    Upgrade Nokogiri to a version that resolves this vulnerability.

    Fixed in 1.16.2
  3. Compensating control

    If using Nokogiri versions before 1.15.6 and 1.16.x before 1.16.2 with DTD validation and XInclude expansion enabled via the XML Reader interface (Nokogiri::XML::Reader), disable DTD validation and/or XInclude expansion to prevent the crafted-XML use-after-free triggered in libxml2 xmlTextReader (CVE-2024-25062, xmlValidatePopElement).

Event History

Aug 25, 2026
CVE Published
via MITRE·03:15 PM
Rejected
via MITRE·03:15 PM
Data Sourced
via NVD·04:16 PM
Description
Sep 1, 2026
Rejected
via MITRE·08:33 PM

Frequently Asked Questions

1

Which deployments are affected?

Affected deployments use CRuby with Nokogiri before 1.15.6, or a 1.16.x release before 1.16.2, when Nokogiri uses its packaged libxml2. JRuby and installations configured to use system libxml2 are not affected.

2

What conditions are required to trigger the issue?

An application must process an attacker-crafted XML document through Nokogiri::XML::Reader with both DTD validation and XInclude expansion enabled. The vulnerable code path is in libxml2's xmlTextReader module.

3

What versions remediate the vulnerability?

Upgrade to Nokogiri 1.15.6 or 1.16.2. These releases update the packaged libxml2 to versions 2.11.7 and 2.12.5, respectively.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203