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.

Project Subscriptions

No data.

Advisories

No advisories yet.

Fixes

Solution

Upgrade to HTML-Parser 3.84 or later.


Workaround

No workaround given by the vendor.

History

Thu, 04 Jun 2026 13:30:00 +0000

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'}


Thu, 04 Jun 2026 07:30:00 +0000

Type Values Removed Values Added
References

Thu, 04 Jun 2026 02:30:00 +0000

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

Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-06-04T12:59:07.698Z

Reserved: 2026-05-18T13:24:05.252Z

Link: CVE-2026-8829

cve-icon Vulnrichment

Updated: 2026-06-04T05:36:41.267Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-06-04T03:16:20.260

Modified: 2026-06-04T15:21:14.080

Link: CVE-2026-8829

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-04T15:30:17Z

Weaknesses