Skip to main content

HTML::Entities EUVDEUVD-2026-34194

| CVE-2026-8829 HIGH
Use After Free (CWE-416)
2026-06-04 CPANSec GHSA-9p7j-9995-m88w
7.5
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

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

  1. Access
    Identify Perl app decoding entities with custom hash
  2. Delivery
    Submit input aliased to self-referential hash value
  3. Exploit
    Trigger grow_gap realloc of input SV
  4. Execution
    _decode_entities reads freed heap via stale repl pointer
  5. Persist
    Receive decoded output containing leaked heap bytes
  6. Impact
    Reconstruct adjacent secrets from disclosure

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

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

Exploitation Conditions

Exploitation requires the victim Perl process to call HTML::Entities::_decode_entities (or decode_entities) with a custom entity2char hash where the input scalar is the same SV as one of the hash's value scalars, and that value must embed its own key as an entity reference (self-aliased) with a payload large enough to force grow_gap() to realloc the PV buffer (the regression test uses 32+8192 bytes). The attacker must also be able to observe the decoded output to recover the leaked heap bytes. Default usage of decode_entities() without a custom hash does NOT meet these conditions, and the standard built-in entity table contains no self-referential entries, so applications that decode entities normally are not exposed; the network attack vector applies only to apps that funnel attacker-controlled data into this specific aliasing pattern.

Impact

The CVSS 7.5 (AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:N) reflects high confidentiality impact with no integrity/availability effect, consistent with a pure heap-read information disclosure. However, the network attack vector is an upper bound assumption that holds only when an application passes attacker-controlled data into HTML::Entities with an attacker-influenceable entity hash whose values are self-aliased - a relatively narrow precondition that typical HTML decoding pipelines do not meet. The EPSS score of 0.02% (4th percentile) and absence from CISA KEV align with this: real-world exploitability is low and no public exploit identified at time of analysis. The discoverer (CPANSec) and a precise regression test in the patch confirm the bug is reachable, but practical leakage of sensitive secrets requires the victim process to call _decode_entities on a hash structured in the vulnerable way, which is unusual outside of contrived or test code paths.

Exploit ScenarioDerived

An attacker submits input to a Perl web application that decodes HTML entities using a user-influenced or self-referential custom entity hash, where one hash value is large enough to force a buffer regrowth and contains its own key as an entity reference (e.g. $h{foo} = ('A'x32) . '&foo;' . ('B'x8192)). When _decode_entities is invoked with that hash value as the input SV, the post-grow_gap copy reads from freed heap memory, and the leaked bytes are returned in the decoded string visible to the attacker. The PR's regression test demonstrates the trigger but no weaponized public exploit identified at time of analysis.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 04, 2026

Heap information disclosure in HTML::Entities for Perl (versions before 3.84) allows remote attackers to leak adjacent heap memory contents when decoding entities. The XS routine _decode_entities retains a stale pointer into a hash value SV after grow_gap() reallocates the buffer, causing a use-after-free read that copies freed heap bytes into the output scalar. No public exploit identified at time of analysis and EPSS is very low (0.02%), but the upstream fix is confirmed via GH PR #56.

RemediationAI

Vendor-released patch: HTML::Entities 3.84 - upgrade the HTML-Parser distribution to 3.84 or later via cpan/cpanm, or apply the distribution-provided update (Debian is tracking the fix across four releases). The upstream commit is 6922552b0778c90a9587a3894e248be4d3a25e1c on https://github.com/libwww-perl/HTML-Parser/pull/56, which changes decode_entities() in util.c to detect self-aliased SVs and copy the entity value into an owned buffer before grow_gap() can realloc the input SV. If immediate upgrade is not possible, avoid passing the same SV as both input and an entity hash value to _decode_entities (i.e. do not call decode with a custom %entities hash whose values reference the same scalar being decoded); restrict any code paths that allow untrusted input to supply or influence the entity2char hash. These workarounds eliminate the trigger but require auditing every caller that uses the second-argument hash override.

Affected VersionsENISA

HTML::Entities 0 <3.84

Affected Packages

euvd html_entities fix: 3.84

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::Entities is the entity encoding/decoding module bundled with the HTML-Parser CPAN distribution (cpe:2.3:a:oalders:html::entities), implemented in XS (C) for performance. The defect is a CWE-416 Use-After-Free in util.c: decode_entities() calls hv_fetch() on the entity2char hash and caches the value SV's PV pointer in repl, but when the caller-supplied input SV is the same SV as the hash value (self-aliased entity, e.g. a hash entry whose value contains its own key as '&name;'), a subsequent grow_gap() expansion of the input SV's PV reallocates and frees the original allocation that repl still references. The following Copy() loop then reads repl_len bytes from the freed heap region into the destination SV, surfacing whatever the allocator has placed at that address.

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 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
SUSE 4.8 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L

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
None
Availability
None

Lifecycle Timeline

2
CVSS changed
Jun 04, 2026 - 14:22 NVD
7.5 (HIGH)
CVE Published
Jun 04, 2026 - 02:03 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

HTML::Entities versions before 3.84 for Perl read freed heap memory in _decode_entities.

The XS routine backing HTML::Entities::_decode_entities cached a pointer (repl) into the entity-value SV returned by hv_fetch on the entity2char hash. When the input SV was identical to a value SV in that hash, and that value contained its own key as an entity reference, a later call to grow_gap() reallocated the SV's PV buffer and freed the backing allocation that repl still pointed into. The subsequent copy loop read repl_len bytes from the freed allocation.

The read may disclose adjacent heap contents into the destination SV.

Executive ViewAI

Why It Matters

HTML::Entities for Perl (versions before 3.84) contains a heap memory disclosure vulnerability that may expose sensitive application data when processing HTML entities. While a vendor patch is available and no active exploitation has been identified, organizations using this library should prioritize upgrades to eliminate the risk of unauthorized data leakage from production systems.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% exploitable
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC Vendor CIRCL GitHub VulDB

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 HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

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.

Vendor StatusVendor

Debian

libhtml-parser-perl
Release Status Fixed Version Urgency
bullseye vulnerable 3.75-1 -
bookworm vulnerable 3.81-1 -
forky, sid, trixie vulnerable 3.83-1 -
(unstable) fixed (unfixed) -

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Basesystem 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected

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