Vulnerability · Published Jun 25, 2026 · Assigned by GitHub_M

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

Medium 6.3

In plain English

A medium-severity out-of-bounds read in nokogiri from sparklemotion. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 37% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.4%top 62.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12ruby-nokogirino fix listedDEBIAN-CVE-2026-57235
Debian:13ruby-nokogirino fix listedDEBIAN-CVE-2026-57235
Debian:14ruby-nokogiri1.19.4+dfsg-1DEBIAN-CVE-2026-57235
RubyGemsnokogiri1.19.4GHSA-5prr-v3j2-97mh
Ubuntu:24.04:LTSruby-nokogirino fix listedUBUNTU-CVE-2026-57235
Ubuntu:25.10ruby-nokogirino fix listedUBUNTU-CVE-2026-57235
Ubuntu:26.04:LTSruby-nokogirino fix listedUBUNTU-CVE-2026-57235
Ubuntu:26.10ruby-nokogirino fix listedUBUNTU-CVE-2026-57235

Affected products (as reported)

VendorProductVersions
sparklemotion nokogiri < 1.19.4

Weakness: CWE-125, CWE-190 · Vector: 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

References