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.
Advisories

No advisories yet.

Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

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

Type Values Removed Values Added
Description 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.
Title Nokogiri before 1.16.2 Use-After-Free via xmlTextReader
First Time appeared Nokogiri
Nokogiri nokogiri
Weaknesses CWE-416
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'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T15:15:57.242Z

Reserved: 2026-08-16T13:02:14.690Z

Link: CVE-2024-58378

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2024-58378

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses