CVE-2026-59142Data::HashMap::Shared versions before 0.14 for Perl allow an out-of-bounds read via an…
Data::HashMap::Shared versions before 0.14 for Perl allow an out-of-bounds read via an unvalidated arena offset and length in shm_str_copy. The attach-time validator shm_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. shm_str_copy does memcpy(dst, arena + off, len) with off and len read raw from the mmap'd segment and unbounded, on the each, keys, values, pop, shift, take, swap, drain and cursor paths. The get path bounds off and len separately and is not affected. A local peer that can write the backing file can leave the header valid while poisoning a record's offset and length, so iterating or draining the map copies a file-controlled offset and length out of the arena, reading adjacent memory or crashing the process.
What to do
None of the Linux distributions or Windows releases we track list an affected package for this CVE. Check the vendor-reported products below.
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
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.
- EGOR Data::HashMap::Shared: affected: before 0.14; fixed in
0.14
Solution: Upgrade to Data::HashMap::Shared 0.14 or later, which bounds the arena offset and length in shm_str_copy before the copy.
Workaround: For deployments that cannot upgrade to 0.14, place the backing file in a directory writable only by the owning user, so a local peer cannot tamper with the records the iteration paths read.
Vendor advisories:
References
- https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/diff/EGOR/Data-HashMap-Shared-0.13#shm_generic.h
- https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/changes
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.