CVE-2026-64616

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

Published Jul 21, 2026 CVSS 3.1 · 3.3 Low EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

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

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 available
History
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'}

Type Values Removed Values Added
First Time appeared Egor
Egor data::ndarray::shared
Vendors & Products Egor
Egor data::ndarray::shared
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
Weaknesses
  • CWE-59

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

  • CWE-732

    Incorrect Permission Assignment for Critical Resource

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Jul 30, 2026, 4:53 PM
Reserved
Jul 20, 2026, 11:30 AM
Status
Deferred
Published
Jul 21, 2026, 8:17 PM
Modified
Oct 24, 2026, 7:10 PM