Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-57437: CWE-416: Use After Free in sparklemotion nokogiri

0
Low
VulnerabilityCVE-2026-57437cvecve-2026-57437cwe-416
Published: 06/25/2026 (06/25/2026, 14:34:09 UTC)
Source: CVE Database V5
Vendor/Project: sparklemotion
Product: nokogiri

Description

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::XPathContext did not keep its source document alive for garbage collection. If an XPathContext outlived its document and the document was collected, evaluating an XPath expression could read invalid memory and potentially segfault. This is only reachable when application code constructs an XPathContext directly and lets the document become unreachable while continuing to use the context. The normal Document#xpath, #css, and related search methods are not affected, and it is not triggerable by malicious document input. This vulnerability is fixed in 1.19.4.

CVSS v4.0

Score 1.7low

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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/U:Clear

Affected software

nokogiri
pkg:gem/nokogiri
Affected versions
<1.19.4

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

AILast updated: 06/25/2026, 15:01:29 UTC

Technical Analysis

CVE-2026-57437 is a use-after-free vulnerability (CWE-416) in the Nokogiri Ruby library affecting versions prior to 1.19.4. The Nokogiri::XML::XPathContext class did not maintain a reference to its source document, allowing the document to be garbage collected while the XPathContext remained in use. This could cause evaluation of XPath expressions to read invalid memory, potentially causing segmentation faults. The vulnerability is only reachable when application code manually constructs an XPathContext and the document becomes unreachable during continued use. Normal Nokogiri search methods are unaffected, and the vulnerability is not triggered by malicious input. The issue is resolved in Nokogiri 1.19.4.

Potential Impact

The vulnerability can lead to application crashes (segmentation faults) due to use-after-free memory access when XPathContext outlives its source document. There is no indication of remote code execution or data corruption. It is not exploitable via crafted XML/HTML input and requires specific application code patterns to trigger. The CVSS 4.0 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 required as the vulnerability is not exploitable via malicious input and only occurs in specific application usage patterns.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 6a3d3f314853345fc113d1c0

Added to database: 06/25/2026, 14:46:09 UTC

Last enriched: 06/25/2026, 15:01:29 UTC

Last updated: 06/26/2026, 00:01:22 UTC

Views: 8

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses