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

The segment is created in ndarray.h with open(path, O_RDWR|O_CREAT, 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.3 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Data::NDArray::Shared before version 0.02 creates a memory‑mapped file with mode 0666 and opens it without O_EXCL or O_NOFOLLOW. The resulting backing file is world‑readable and, if a symlink or a pre‑existing file occupies the path, a local attacker can read or redirect the directories such as /tmp or /dev/shm, which are accessible to any local user, thus exposing potentially sensitive data that should be confined to the owning process.

Affected Systems

Vendor EGOR provides Data::NDArray::Shared, and any installation of this module that is older than version 0.02—i.e., 0.01 or any release before 0.02—is affected.

Risk and Exploitability

The CVSS score of 3.3, the EPSS score of < 1%, and the fact that the vulnerability is not listed in the CISA KEV catalog indicate a low probability of exploitation. The likely attack vector is local, inferred from the fact that the flaw involves creating a file in a shared directory such as /tmp or /dev/shm that any local user can access; an attacker therefore needs the ability to place a file or symlink at the expected path. The lack of O_NOFOLLOW and O_EXCL allows the attacker to bypass the expected creation semantics and read or overwrite the backing file from this flaw.

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

Remediation

Vendor Solution

Upgrade to Data::NDArray::Shared 0.02 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.02, 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 Data::NDArray::Shared to version 0.02 or later to ensure the backing file is created with mode 0600 and with O_EXCL and O_NOFOLLOW flags.
  • If an upgrade is not feasible, configure a restrictive umask so the backing file is not world‑readable and place it in a directory only the owning user can access.
  • Verify that the directory used for the backing file does not allow symlinks or pre‑created files by applying stricter permissions and by checking for symlink presence before opening; this mitigates the pre‑creation race and symlink attack.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 30 Jul 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

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


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

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

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

Type Values Removed Values Added
Description Data::NDArray::Shared versions before 0.02 for Perl create a world-readable mmap backing file and open it without O_EXCL or O_NOFOLLOW. The segment is created in ndarray.h with open(path, O_RDWR|O_CREAT, 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::NDArray::Shared versions before 0.02 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::ndarray::shared
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-30T16:53:56.277Z

Reserved: 2026-07-20T11:30:10.287Z

Link: CVE-2026-64616

cve-icon Vulnrichment

Updated: 2026-07-23T12:41:54.341Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-59

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

  • CWE-732

    Incorrect Permission Assignment for Critical Resource