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.
Published: 2026-07-21
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Data::HashMap::Shared versions prior to 0.14 for Perl contain an out‑of‑bounds read located in the shm_str_copy routine, which corresponds to CWE‑125. The routine copies raw data from a shared‑memory arena using an offset and length read directly from the mmap'd backing file without any bounds checking. A local user with write permission to the backing file can alter the record’s offset and length values. When the module subsequently iterates over, drains, or otherwise accesses the map, the memcpy operation may read from memory outside the intended region, exposing data adjacent in memory or causing the process to crash; this results in information disclosure or denial of service. The need for local write permission is inferred from the requirement to modify the backing file.

Affected Systems

The vulnerability affects EGOR’s Data::HashMap::Shared Perl module. Any installation of this module with a version earlier than 0.14 is susceptible.

Risk and Exploitability

The vulnerability is scored CVSS 9.1 and has an EPSS of less than 1 %. The exploitation requires local write access to the shared‑memory file, an inference from the need to modify the backing file. Consequently, the attack vector is local, though the severity remains high. The low EPSS suggests limited real‑world exploitation. The vulnerability is not listed in the CISA KEV catalog.

Generated by OpenCVE AI on August 4, 2026 at 05:31 UTC.

Remediation

Vendor Solution

Upgrade to Data::HashMap::Shared 0.14 or later, which bounds the arena offset and length in shm_str_copy before the copy.


Vendor 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.


OpenCVE Recommended Actions

  • Upgrade to Data::HashMap::Shared 0.14 or later to enable bounds checking in shm_str_copy.
  • If upgrading is not possible, place the module’s backing file in a directory that is writable only by the owning user, preventing other local peers from tampering with the file.
  • Set the backing file’s permissions to 600 (or equivalent) to restrict group/others access.

Generated by OpenCVE AI on August 4, 2026 at 05:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Egor
Egor data::hashmap::shared
Vendors & Products Egor
Egor data::hashmap::shared

Wed, 22 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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


Tue, 21 Jul 2026 19:15:00 +0000

Type Values Removed Values Added
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.
Title 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
Weaknesses CWE-125
References

Subscriptions

Egor Data::hashmap::shared
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-22T19:21:55.788Z

Reserved: 2026-07-02T16:24:17.912Z

Link: CVE-2026-59142

cve-icon Vulnrichment

Updated: 2026-07-22T19:21:37.743Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T05:45:03Z

Weaknesses