CVE-2026-57235

Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`

HIGH
8.2
CVSS Score
Published: June 25, 2026 at 02:31 PM UTC
Updated: October 25, 2026 at 11:10 PM UTC
2 products affected across 2 vendorsNokogiriNokogiri

Using nokogiri by sparklemotion?

Get instant alerts when new vulnerabilities affect nokogiri - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.2
Exploit prediction
EPSS 0.4%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.19.4
Affected range stops below 1.19.4, so it looks safe — our inference, not a vendor statement
v < 1.19.4
Affected range stops below 1.19.4, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (1)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5prr-v3j2-97mh

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-125CWE-190

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card