Skip to main content

HTML::Gumbo EUVDEUVD-2025-210396

| CVE-2025-15646 CRITICAL
Access of Resource Using Incompatible Type (Type Confusion) (CWE-843)
2026-07-01 CPANSec GHSA-754r-h5mg-r795
9.8
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach HTML parsing endpoint
  2. Delivery
    Submit HTML with <template> element
  3. Exploit
    Type confusion misroutes template node
  4. Execution
    strlen() over-reads heap block
  5. Persist
    Leaked bytes serialized into output
  6. Impact
    Attacker reads disclosed heap memory

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Type safety enforcement
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The concrete prerequisite is that a caller invokes HTML::Gumbo parse() with the default format => 'string' (or format => 'tree') on input the attacker can influence, and that input contains an HTML <template> element - the presence of that element is the trigger. Limiting factors: parse() called with format => 'callback' is NOT affected because it croaks on the unhandled node type, so only the string/tree serialization paths are exploitable; the disclosure is bounded (over-read of the heap block adjacent to the pointer, not arbitrary memory), and the attacker must be able to observe the serialized output to recover the leaked bytes. Only HTML::Gumbo versions before 0.19 are affected. Authentication is not required (CVSS PR:N).

Impact

The signals conflict and warrant a downgrade from the headline 9.8. The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:H) claims full confidentiality, integrity, and availability impact, but the described behavior is a bounded, read-only heap disclosure - integrity and availability impact are not supported by the description, so the I:H/A:H metrics appear overstated and the realistic severity is closer to 7.5 (confidentiality-only). Reinforcing a moderate real-world priority: EPSS is only 0.66% (47th percentile), the CVE is not on CISA KEV, SSVC records Exploitation as 'none', and no POC is published. Counterbalancing toward attention: SSVC marks the issue Automatable=yes with Technical Impact=total, and the trigger (an HTML string containing <template>) is effortless to deliver to any web-facing Perl service that parses untrusted markup. Net assessment: a genuine, easily triggered information-disclosure bug that is a real but not emergency priority - patch promptly, but the 9.8 rating overstates impact and there is no evidence of active exploitation.

Exploit ScenarioDerived

An attacker submits HTML containing a <template> element to a public endpoint of a Perl web application that uses HTML::Gumbo to parse and reserialize user content (for example a comment sanitizer or feed renderer using the default format => 'string'). The type confusion causes strlen() to over-read the heap, and the leaked bytes - potentially containing adjacent secrets such as session data or key material - are returned in the serialized output the attacker receives. No POC is published, but the network attack vector and low complexity (AC:L, no authentication) make delivery trivial.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.7% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 22, 2026

Heap memory disclosure in the Perl HTML::Gumbo module before 0.19 lets remote attackers leak bounded chunks of process heap by submitting HTML containing a <template> element. The XS binding's walk_tree function misclassifies the template node as a text node and runs strlen() past the intended buffer, serializing the over-read bytes into parse() output. No public exploit is identified at time of analysis, and EPSS is low (0.66%), but exploitation is automatable and the flaw is trivially triggerable against any service that parses untrusted HTML with the default settings.

RemediationAI

Vendor-released patch: 0.19 - upgrade HTML::Gumbo to 0.19 or later (e.g. cpan HTML::Gumbo / cpanm HTML::Gumbo@0.19), which adds GUMBO_NODE_TEMPLATE handling to walk_tree per commit 15c0598909d4a64f47ef0a1abc5051f4e113c186 (https://github.com/bestpractical/HTML-Gumbo/commit/15c0598909d4a64f47ef0a1abc5051f4e113c186.patch); Debian users should track https://bugs.debian.org/1104789 for the distribution package. If immediate upgrade is impossible, a targeted workaround is to switch callers to format => 'callback', which croaks on the unhandled template node type and is not affected - with the trade-off that callers must implement their own node-walking logic and lose the convenience of the 'string'/'tree' serializers. Alternatively, pre-strip or reject <template> elements from untrusted input before parsing, accepting that this changes parser semantics and may drop legitimate markup. Advisory details are in the oss-security post at https://seclists.org/oss-sec/2026/q3/6 and http://www.openwall.com/lists/oss-security/2026/07/01/7.

Affected VersionsENISA

HTML::Gumbo 0 <0.19

Affected Packages

euvd html_gumbo fix: 0.19

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HTML::Gumbo is a Perl XS wrapper around Google's libgumbo HTML5 parsing library. libgumbo 0.10.0 (2015) introduced a dedicated GUMBO_NODE_TEMPLATE node type for the HTML <template> element, but the wrapper's walk_tree function in lib/HTML/Gumbo.xs only recognized GUMBO_NODE_DOCUMENT and GUMBO_NODE_ELEMENT, so template nodes fell through to the text-node handling path. That path calls strlen() on a pointer that does not address a NUL-terminated text buffer, causing a heap over-read. This is the classic CWE-843 (Type Confusion / Access of Resource Using Incompatible Type) pattern: an object of one type is interpreted with the semantics of another, and the resulting length mis-computation leaks adjacent heap contents. The single affected component is cpe:2.3:a:bps:html::gumbo, the Best Practical Solutions (BPS) Perl distribution.

Know when Html gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.5 HIGH

Unauthenticated attacker-controlled HTML triggers the over-read (AV:N/AC:L/PR:N/UI:N), but the effect is a bounded read-only heap disclosure, so C:H with no integrity or availability impact.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVE Published
Jul 01, 2026 - 14:38 cve.org
UNKNOWN (no severity yet)
CVE Published
Jul 01, 2026 - 14:38 cve.org
CRITICAL 9.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

The Perl HTML::Gumbo module contains a critical vulnerability (CVE-2025-15646, CVSS 9.8) that allows remote attackers to extract sensitive data from application memory when processing HTML content. Organizations operating web platforms, content management systems, web crawlers, or any service that processes untrusted HTML face immediate risk of data breach and potential exposure of credentials, session tokens, or database contents. A vendor patch is available and exploitation is trivially achievable with no user interaction required.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 53% exploitable
Prevalence
Low
niche Perl CPAN HTML-parsing module, limited production footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.7%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy