9.8critical
HTML::Gumbo versions before 0.19 for Perl disclose heap memory via type confusion
- Severity
- 9.8critical CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.51% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- CPANSec
Description
HTML::Gumbo versions before 0.19 for Perl disclose heap memory via type confusion. Support for the <template> element was added to libgumbo 0.10.0 in 2015, but the walk_tree function in lib/HTML/Gumbo.xs was not updated to support it. The element was treated as a text-node, where strlen() over-reads the heap block that the pointer addresses. Any caller that runs parse() with the default format => 'string', or with format => 'tree', on input containing a <template> element serializes the over-read bytes into the returned result, disclosing bounded heap contents. format => 'callback' reaches a croak on the unhandled node type and is unaffected.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| HTML-Gumbo | before 0.19 | CVE List |
Classification
What each source says
CVE List
HTML::Gumbo versions before 0.19 for Perl disclose heap memory via type confusion. Support for the <template> element was added to libgumbo 0.10.0 in 2015, but the walk_tree function in lib/HTML/Gumbo.xs was not updated to support it. The element was treated as a text-node, where strlen() over-reads the heap block that the pointer addresses. Any caller that runs parse() with the default format => 'string', or with format => 'tree', on input containing a <template> element serializes the over-read bytes into the returned result, disclosing bounded heap contents. format => 'callback' reaches a croak on the unhandled node type and is unaffected.
NVD (es)
Las versiones de HTML::Gumbo anteriores a la 0.19 para Perl revelan memoria del heap a través de confusión de tipos. El soporte para el elemento <template> se añadió a libgumbo 0.10.0 en 2015, pero la función walk_tree en lib/HTML/Gumbo.xs no se actualizó para soportarlo. El elemento fue tratado como un nodo de texto, donde strlen() lee más allá del bloque del heap al que apunta el puntero. Cualquier llamador que ejecute parse() con el formato predeterminado => 'string', o con formato => 'tree', en una entrada que contenga un elemento <template> serializa los bytes leídos en exceso en el resultado devuelto, revelando contenidos acotados del heap. formato => 'callback' alcanza un croak en el tipo de nodo no manejado y no se ve afectado.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-15646 changed 2026-07-01 | CVE Terms of Use |
| NVD | CVE-2025-15646 changed 2026-10-06 | Public domain |