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-57235: CWE-125: Out-of-bounds Read in sparklemotion nokogiri

0
Medium
VulnerabilityCVE-2026-57235cvecve-2026-57235cwe-125cwe-190
Published: 06/25/2026 (06/25/2026, 14:31:10 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::NodeSet#[] (and its alias #slice) checked the requested index against the node set's bounds using a 32-bit-truncated copy of the index. A large negative index could pass the check and then be used at full width, reading outside the node set's storage. On CRuby this is an out-of-bounds read that typically crashes the process; on JRuby it is not memory-unsafe but returns an incorrect node. This vulnerability is fixed in 1.19.4.

CVSS v4.0

Score 6.3medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
Low
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:L/VI:N/VA:L/SC:N/SI:N/SA:N

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:59 UTC

Technical Analysis

CVE-2026-57235 describes an out-of-bounds read vulnerability in the Nokogiri library for Ruby, specifically in the NodeSet indexing methods (#[] and #slice). The vulnerability arises because the index is checked against the node set bounds using a 32-bit truncated copy, allowing a large negative index to pass the check but then be used at full width, resulting in reading memory outside the intended storage. This leads to process crashes on CRuby and incorrect node returns on JRuby. The issue is resolved in Nokogiri version 1.19.4.

Potential Impact

On CRuby, exploitation of this vulnerability typically causes a process crash due to out-of-bounds memory reads. On JRuby, it does not cause memory corruption but returns incorrect data, potentially leading to application logic errors. There is no indication of remote code execution or privilege escalation. The CVSS 4.0 score is 6.3 (medium severity), reflecting a network attack vector with low complexity and partial attack prerequisites.

Mitigation Recommendations

Upgrade Nokogiri to version 1.19.4 or later, where this vulnerability is fixed. No other mitigation is indicated or required.

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-24T02:21:33.812Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a3d3f304853345fc113d17f

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

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

Last updated: 06/26/2026, 01:45:56 UTC

Views: 9

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