Description
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::Document#root= validated only that the new root was a Nokogiri::XML::Node, allowing a DTD node to be set as the document root. The result is a heap use-after-free during garbage collection or finalization, leading to an invalid memory read or potentially a segfault. This vulnerability is fixed in 1.19.4.
Severity (CVSS)
| Base score | 1.7 |
|---|---|
| Severity | Low |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U |
| Provided by | CNA |
Weaknesses
- CWE-416 — CWE-416: Use After Free
Affected products
| Vendor | Product | Versions |
|---|---|---|
| sparklemotion | nokogiri | < 1.19.4 |
References
- https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-wjv4-x9w8-wm3h (x_refsource_CONFIRM)
Generated from the official CVE List on 26 Jun 2026 07:05 UTC.