CVE-2026-57235
published medium CVSS 4.0 · 6.3Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| sparklemotion | — | nokogiri< 1.19.4 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | ruby-nokogiri | Fixed | 1.19.4-r0 | Package fix record |
| Alpine Linux | v3.24 | ruby-nokogiri | Fixed | 1.19.4-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| sparklemotion | nokogiri | < 1.19.4 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-125 CWE-125: Out-of-bounds Read
- CWE-190 CWE-190: Integer Overflow or Wraparound
References
1Provider assertions
2GitHub_M · cna
Nokogiri: Possible Out-of-Bounds Read in `Nokogiri::XML::NodeSet#[]`
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- fa1b9b6c9e674757dc018f75160afdf45f830a348719cceeb220fbd0f96b0720
- Ingested
- 23 Sep 2026, 09:21:43 UTC
- Source record
- Official CVE record