Description
Data::HashMap::Shared versions before 0.14 for Perl create a world-readable mmap backing file and open it without O_EXCL or O_NOFOLLOW.

The segment is created in shm_generic.h with open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0666). The mode is 0666, so under the default umask 022 the file is created mode 0644 (world-readable). O_NOFOLLOW is absent, so a symlink planted at the path is followed, and O_EXCL is absent, so the open silently uses a pre-planted file instead of failing.

A "Shared" segment naturally lives in a shared directory such as /tmp or /dev/shm, where any local user can read the IPC payloads stored in the world-readable segment, and a pre-planted file or symlink at the path lets a local attacker win a pre-creation race or redirect the open.
Published: 2026-07-21
Score: 3.8 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Data::HashMap::Shared modules before version 0.14 create a backing file for shared memory with mode 0666, making the file world-readable under a default umask of 022. The file is opened without O_EXCL or O_NOFOLLOW, allowing a local attacker to plant a symlink or pre-create a file at the backing-file path. These weaknesses correspond to CWE-59 and CWE-732. As a result, a local attacker can read the contents of the shared memory or interfere with the creation of the backing file, potentially exposing sensitive data held by the shared segment.

Affected Systems

Any system running Perl applications that use the EGOR Data::HashMap::Shared module prior to version 0.14 is impacted. The vulnerability applies regardless of operating system, as the issue resides in the module's code, not the underlying OS. Scripts that import this module and create shared memory segments will inherit the risk unless upgraded.

Risk and Exploitability

With a CVSS score of 3.8 the vulnerability is considered low to moderate severity. The EPSS score of less than 1 % indicates rare exploitation. It is not listed in the CISA KEV catalog. The attack requires local privilege and the ability to run Perl code that imports Data::HashMap::Shared. Because the module creates a world-readable file in shared directories such as /tmp or /dev/shm, a local attacker can read sensitive data from the shared memory or modify the backing file if they control the directory. If the Perl process runs with elevated privileges, the impact could extend to system-wide data exposure.

Generated by OpenCVE AI on August 3, 2026 at 00:25 UTC.

Remediation

Vendor Solution

Upgrade to Data::HashMap::Shared 0.14 or later, which creates the backing file mode 0600 (owner-only) with O_EXCL and O_NOFOLLOW.


Vendor Workaround

For deployments that cannot upgrade to 0.14, set a restrictive umask so the backing file is not world-readable and place it in a directory only the owning user can access.


OpenCVE Recommended Actions

  • Upgrade to Data::HashMap::Shared 0.14 or later, which secures the backing file with mode 0600 and uses O_EXCL and O_NOFOLLOW.
  • If an upgrade is not possible, configure a restrictive umask (e.g., 077) before creating the shared segment so that the file is not world-readable.
  • Ensure the directory used for the backing file is owned by the user executing the Perl script and has permissions that prevent other local users from accessing it.

Generated by OpenCVE AI on August 3, 2026 at 00:25 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

Thu, 23 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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


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

Type Values Removed Values Added
Description Data::HashMap::Shared versions before 0.14 for Perl create a world-readable mmap backing file and open it without O_EXCL or O_NOFOLLOW. The segment is created in shm_generic.h with open(path, O_RDWR | O_CREAT | O_CLOEXEC, 0666). The mode is 0666, so under the default umask 022 the file is created mode 0644 (world-readable). O_NOFOLLOW is absent, so a symlink planted at the path is followed, and O_EXCL is absent, so the open silently uses a pre-planted file instead of failing. A "Shared" segment naturally lives in a shared directory such as /tmp or /dev/shm, where any local user can read the IPC payloads stored in the world-readable segment, and a pre-planted file or symlink at the path lets a local attacker win a pre-creation race or redirect the open.
Title Data::HashMap::Shared versions before 0.14 for Perl create a world-readable mmap backing file and open it without O_EXCL or O_NOFOLLOW
Weaknesses CWE-59
CWE-732
References

Subscriptions

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

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-23T12:59:03.694Z

Reserved: 2026-07-21T15:29:37.116Z

Link: CVE-2026-65064

cve-icon Vulnrichment

Updated: 2026-07-23T12:53:46.277Z

cve-icon NVD

Status : Deferred

Published: 2026-07-21T20:17:05.430

Modified: 2026-07-23T14:17:44.167

Link: CVE-2026-65064

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T00:30:16Z

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

  • CWE-732

    Incorrect Permission Assignment for Critical Resource