llamaCVEVulnerability Intelligence
/
Advisory · GitHub · RubyGems · nokogiri

GHSA-5PRR-V3J2-97MH

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

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -1 d de la divulgación
Exposición153 dDesde la divulgación, 19 jun 2026, 11:36 a. m.
Detección150 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 1.19.4
Monitoreo
Detectada
18 jun 26
19 jun 26
10 sept 26
17 nov 26
19 nov 26
18 jun 26
27 jul 26
3 sept 26
12 oct 26
19 nov 26
FechaFaseEventoDetalle
Remediación Parche 1.19.4 nokogiri · -1 d desde divulgación
Divulgación Publicada GHSA-5PRR-V3J2-97MH divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

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

Nokogiri 1.19.4 performs the bounds check against the full-width index.

Severity

The Nokogiri maintainers have evaluated this as medium severity.

Exploitation requires an application to pass an attacker-controlled integer to `NodeSet#[]`. The primary impact is a controlled crash (denial of service), with potential for memory disclosure on CRuby.

On JRuby, Nokogiri is not affected by this vulnerability.

Mitigation

Upgrade to Nokogiri 1.19.4 or later.

As a workaround, applications that index a `NodeSet` with externally-supplied integers can validate the index against `node_set.length` before use, or avoid passing untrusted values as an index.

Credit

This issue was responsibly reported by Zheng Yu from depthfirst.com.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
nokogiri< 1.19.4
1.19.4
1.19.7
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
rubygemsnokogiri
Corregida 1.19.4 -1 d 1.19.7 no afectada
Versiones corregidas1.19.4
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Otrahttps://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5prr-v3j2-97mh
Otrahttps://github.com/sparklemotion/nokogiri

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.