GHSA-G9G8-VGVW-G3VF
Possible invalid memory read when calling `Nokogiri::XML::Node#initialize_copy_with_args` with incorrect argument type
Texto original en inglés · Ver en español
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-G9G8-VGVW-G3VF divulgada | |
| Remediación | Parche 1.19.4 | nokogiri · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The protected copy helper behind `Node#dup` and `#clone` unwrapped its source argument as an `xmlNode` without a type check. Supplying a non-Node (e.g. a `Namespace`) made it read an `xmlNs` out of bounds, crashing the process.
Nokogiri 1.19.4 performs a type check and raises `TypeError` when an argument of invalid type is passed.
Only CRuby is affected. JRuby is not affected.
Severity
The Nokogiri maintainers have evaluated this as low severity. This is only triggered by a programming error. It requires application code to call the protected internal `initialize_copy_with_args` method with an argument that is not a `Nokogiri::XML::Node`. Nokogiri 1.19.4 now raises `TypeError` instead of reading out of bounds. It cannot be triggered by untrusted input or through normal use of the public API.
Mitigation
Upgrade to Nokogiri 1.19.4 or later. There is no workaround.
Credit
This issue was responsibly reported by Zheng Yu from depthfirst.com.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
rubygemsnokogiri |
Corregida | 1.19.4 | 0 d | 1.19.7 no afectada |
1.19.4Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-g9g8-vgvw-g3vfLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
