CVE-2026-57436: CWE-416: Use After Free in sparklemotion nokogiri
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.
AI Analysis
Technical Summary
CVE-2026-57436 is a use-after-free vulnerability in the Nokogiri library for Ruby, specifically in the Nokogiri::XML::Document#root= method. Before version 1.19.4, this method only checked that the new root was a Nokogiri::XML::Node, permitting a DTD node to be assigned as the document root. This improper validation leads to a heap use-after-free condition during garbage collection or finalization, resulting in invalid memory reads or possible crashes. The issue is resolved in Nokogiri version 1.19.4.
Potential Impact
The vulnerability can cause invalid memory reads or segmentation faults due to use-after-free conditions during garbage collection or finalization. The CVSS 4.0 base score is 1.7, indicating a low severity impact. There is no indication of privilege escalation or remote code execution. No known exploits are reported in the wild.
Mitigation Recommendations
A fix is available in Nokogiri version 1.19.4. Users should upgrade to version 1.19.4 or later to remediate this vulnerability. No other mitigation actions are specified or required.
CVE-2026-57436: CWE-416: Use After Free in sparklemotion nokogiri
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.
CVSS v4.0
Score 1.7low
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-57436 is a use-after-free vulnerability in the Nokogiri library for Ruby, specifically in the Nokogiri::XML::Document#root= method. Before version 1.19.4, this method only checked that the new root was a Nokogiri::XML::Node, permitting a DTD node to be assigned as the document root. This improper validation leads to a heap use-after-free condition during garbage collection or finalization, resulting in invalid memory reads or possible crashes. The issue is resolved in Nokogiri version 1.19.4.
Potential Impact
The vulnerability can cause invalid memory reads or segmentation faults due to use-after-free conditions during garbage collection or finalization. The CVSS 4.0 base score is 1.7, indicating a low severity impact. There is no indication of privilege escalation or remote code execution. No known exploits are reported in the wild.
Mitigation Recommendations
A fix is available in Nokogiri version 1.19.4. Users should upgrade to version 1.19.4 or later to remediate this vulnerability. No other mitigation actions are specified or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-24T13:21:20.729Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3d3f314853345fc113d1bd
Added to database: 06/25/2026, 14:46:09 UTC
Last enriched: 06/25/2026, 15:01:35 UTC
Last updated: 06/25/2026, 23:46:08 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.