CVE-2026-59142: CWE-125 Out-of-bounds Read in EGOR Data::HashMap::Shared
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.
AI Analysis
Technical Summary
CVE-2026-59142 is an out-of-bounds read vulnerability in Data::HashMap::Shared versions prior to 0.14. The flaw exists in the shm_str_copy function, which performs memcpy using offset and length values read directly from a memory-mapped segment without proper validation. Although the attach-time validator shm_validate_header checks header scalars and region layout against file size, it does not validate the array contents, which are then trusted. A local attacker who can write to the backing file can craft a valid header but poison a record's offset and length, causing out-of-bounds reads or process crashes when iterating or draining the map. The get path is not affected as it bounds offset and length separately.
Potential Impact
An attacker with local write access to the backing file can cause out-of-bounds reads or application crashes by manipulating offset and length values used in memory copy operations. This can lead to exposure of adjacent memory contents or denial of service due to process crashes. There is no indication of remote exploitation or privilege escalation from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict write access to the backing file to trusted users only to prevent poisoning of offset and length values. Avoid using affected versions in untrusted environments.
CVE-2026-59142: CWE-125 Out-of-bounds Read in EGOR Data::HashMap::Shared
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.
Affected software
pkg:github/Data-HashMap-SharedRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-59142 is an out-of-bounds read vulnerability in Data::HashMap::Shared versions prior to 0.14. The flaw exists in the shm_str_copy function, which performs memcpy using offset and length values read directly from a memory-mapped segment without proper validation. Although the attach-time validator shm_validate_header checks header scalars and region layout against file size, it does not validate the array contents, which are then trusted. A local attacker who can write to the backing file can craft a valid header but poison a record's offset and length, causing out-of-bounds reads or process crashes when iterating or draining the map. The get path is not affected as it bounds offset and length separately.
Potential Impact
An attacker with local write access to the backing file can cause out-of-bounds reads or application crashes by manipulating offset and length values used in memory copy operations. This can lead to exposure of adjacent memory contents or denial of service due to process crashes. There is no indication of remote exploitation or privilege escalation from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict write access to the backing file to trusted users only to prevent poisoning of offset and length values. Avoid using affected versions in untrusted environments.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-07-02T16:24:17.912Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a5fc4922a4a8d5989a1c9fd
Added to database: 07/21/2026, 19:12:18 UTC
Last enriched: 07/21/2026, 19:26:49 UTC
Last updated: 07/21/2026, 21:10:16 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.