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

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 29% of CVEs (2026-12-01)
- Published: 2026-06-19T16:36:42.000Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-5prr-v3j2-97mh
- Weaknesses: CWE-125, CWE-190
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- sparklemotion nokogiri: < 1.19.4
- nokogiri (RubyGems): before 1.19.4
- nokogiri nokogiri: before 1.19.4

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 8.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H`

## References

- <https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5prr-v3j2-97mh> (mitigation, vendor-advisory, web)
- <https://github.com/sparklemotion/nokogiri> (package)

## Sources

- CVE List: [CVE-2026-57235](https://www.cve.org/CVERecord?id=CVE-2026-57235), CVE Terms of Use, modified 2026-06-25
- GitHub Advisory Database: [GHSA-5prr-v3j2-97mh](https://github.com/advisories/GHSA-5prr-v3j2-97mh), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-57235](https://nvd.nist.gov/vuln/detail/CVE-2026-57235), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-57235 · Whole record: https://cve.day/CVE-2026-57235.json · Rebuilt by cve.day 2026-11-25T22:59:26.370Z
