CVE-2026-57437

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri::XML::XPathContext did not keep its source document alive for garbage collection. If an XPathContext outlived its document and the document was collected, evaluating an XPath expression could read invalid memory and potentially segfault. This is only reachable when application code constructs an XPathContext directly and lets the document become unreachable while continuing to use the context. The normal Document#xpath, #css, and related search methods are not affected, and it is not triggerable by malicious document input. This vulnerability is fixed in 1.19.4.
References
Configurations

Configuration 1 (hide)

cpe:2.3:a:nokogiri:nokogiri:*:*:*:*:*:ruby:*:*

History

25 Oct 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) Nokogiri es una biblioteca XML y HTML de código abierto para el lenguaje de programación Ruby. Antes de la 1.19.4, Nokogiri::XML::XPathContext no mantenía su documento fuente vivo para la recolección de basura. Si un XPathContext sobrevivía a su documento y el documento era recolectado, evaluar una expresión XPath podría leer memoria inválida y potencialmente causar un segfault. Esto solo es alcanzable cuando el código de la aplicación construye un XPathContext directamente y permite que el documento se vuelva inalcanzable mientras se continúa usando el contexto. Los métodos de búsqueda normales Document#xpath, #css y relacionados no se ven afectados, y no es activable por entrada de documento malicioso. Esta vulnerabilidad está corregida en la 1.19.4.

Information

Published : 2026-06-25 15:16

Updated : 2026-10-25 23:10


NVD link : CVE-2026-57437

Mitre link : CVE-2026-57437

CVE.ORG link : CVE-2026-57437


JSON object : View

Products Affected

nokogiri

  • nokogiri
CWE
CWE-416

Use After Free