CVE-2025-15646HTML::Gumbo versions before 0.19 for Perl disclose heap memory via type confusion
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.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libhtml-gumbo-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | libhtml-gumbo-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | libhtml-gumbo-perl | Fix pending | UBUNTU-CVE-2025-15646 | |
| Ubuntu 22.04 | libhtml-gumbo-perl | Fix pending | UBUNTU-CVE-2025-15646 | |
| Ubuntu 20.04 | libhtml-gumbo-perl | Fix pending | UBUNTU-CVE-2025-15646 | |
| Ubuntu 18.04 | libhtml-gumbo-perl | Fix pending | UBUNTU-CVE-2025-15646 | |
| Debian 14 | libhtml-gumbo-perl | Fixed | 0.18-5 | DEBIAN-CVE-2025-15646 |
| Debian 13 | libhtml-gumbo-perl | Fixed | 0.18-5 | DEBIAN-CVE-2025-15646 |
| Debian 12 | libhtml-gumbo-perl | Fixed | 0.18-3+deb12u1 | DEBIAN-CVE-2025-15646 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- BPS HTML::Gumbo: affected: before 0.19; fixed in
0.19
Solution: Upgrade to HTML-Gumbo 0.19 or later, which adds GUMBO_NODE_TEMPLATE to the container node types handled by walk_tree.
Vendor advisories:
- https://github.com/bestpractical/HTML-Gumbo/commit/15c0598909d4a64f47ef0a1abc5051f4e113c1… (patch)
- https://metacpan.org/release/BPS/HTML-Gumbo-0.19/changes (release-notes)
References
- https://github.com/bestpractical/HTML-Gumbo/commit/15c0598909d4a64f47ef0a1abc5051f4e113c186.patch
- https://metacpan.org/release/BPS/HTML-Gumbo-0.19/changes
- https://bugs.debian.org/1104789
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.