CVE-2026-59142 Details
Description
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.
A vulnerability allowing out-of-bounds read has been identified in the Perl module Data::HashMap::Shared, specifically in versions prior to 0.14. The issue arises from the 'shm_str_copy' function, which performs a 'memcpy' operation using offsets and lengths derived from the mmap'd segment. These offsets and lengths are not properly validated, leading to potential memory corruption. The vulnerability can be exploited by a local peer with write access to the backing file, allowing them to manipulate the data read by the 'shm_str_copy' function. This could result in reading adjacent memory locations or causing a crash by disrupting the process's memory management.
Users can upgrade to Data::HashMap::Shared version 0.14 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 21, 2026CISA-ADP
Assessed Jul 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/changes | CPANSec | ProductVendor |
| https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/diff/EGOR/Data-HashMap-Shared-0.13#shm_generic.h | CPANSec | Source CodeVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Data::HashMap::Shared | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::I16 | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::I16S | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::I32 | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::I32S | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::II | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::IS | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::SI | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::SI16 | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::SI32 | < 0.14 |
CPE
Remediation
| |
| Data::HashMap::Shared::SS | < 0.14 |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 22, 2026 | CVE Modified | CISA-ADP |
| Jul 21, 2026 | New CVE Received | CPANSec |
Volerion