CVE-2026-57435: 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’s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible segfault. This vulnerability is fixed in 1.19.4.
AI Analysis
Technical Summary
CVE-2026-57435 describes a use-after-free vulnerability in Nokogiri's CRuby native extension versions before 1.19.4. When Nokogiri::XML::Attr#value= replaces an XML attribute's value, it may free the underlying native child node while the Ruby wrapper remains accessible via the document node cache. Subsequent use of this freed child node or Ruby garbage collection marking can dereference invalid pointers, causing invalid reads and potential segmentation faults. This vulnerability is resolved in Nokogiri version 1.19.4.
Potential Impact
The vulnerability can cause invalid memory reads and segmentation faults in applications using affected Nokogiri versions. There is no indication of remote code execution or data corruption beyond potential crashes. The CVSS score is low (1.7), reflecting limited impact and exploitability.
Mitigation Recommendations
Upgrade Nokogiri to version 1.19.4 or later, where this use-after-free vulnerability is fixed. No other mitigation is indicated or required.
CVE-2026-57435: 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’s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible 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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-57435 describes a use-after-free vulnerability in Nokogiri's CRuby native extension versions before 1.19.4. When Nokogiri::XML::Attr#value= replaces an XML attribute's value, it may free the underlying native child node while the Ruby wrapper remains accessible via the document node cache. Subsequent use of this freed child node or Ruby garbage collection marking can dereference invalid pointers, causing invalid reads and potential segmentation faults. This vulnerability is resolved in Nokogiri version 1.19.4.
Potential Impact
The vulnerability can cause invalid memory reads and segmentation faults in applications using affected Nokogiri versions. There is no indication of remote code execution or data corruption beyond potential crashes. The CVSS score is low (1.7), reflecting limited impact and exploitability.
Mitigation Recommendations
Upgrade Nokogiri to version 1.19.4 or later, where this use-after-free vulnerability is fixed. No other mitigation is indicated or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-24T13:21:20.728Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3d3f304853345fc113d188
Added to database: 06/25/2026, 14:46:08 UTC
Last enriched: 06/25/2026, 15:01:40 UTC
Last updated: 06/25/2026, 20:18:07 UTC
Views: 3
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.