CVE-2026-8829

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

Published Jun 4, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
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.

Remediation

Vendor Solution

Upgrade to HTML-Parser 3.84 or later.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4655-1 libhtml-parser-perl security update
Ubuntu USN Ubuntu USN USN-8587-1 HTML-Parser vulnerability
History
Type Values Removed Values Added
First Time appeared Oalders html\
CPEs cpe:2.3:a:oalders:html\:\:entities:*:*:*:*:*:perl:*:*
Vendors & Products Oalders html\
Type Values Removed Values Added
First Time appeared Oalders
Oalders html::entities
Vendors & Products Oalders
Oalders html::entities
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title HTML::Entities versions before 3.84 for Perl read freed heap memory in _decode_entities
Weaknesses CWE-416
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Jun 28, 2026, 11:34 AM
Reserved
May 18, 2026, 1:24 PM
Status
Modified
Published
Jun 4, 2026, 3:16 AM
Modified
Jul 22, 2026, 8:10 PM