CVE-2026-65068

Data::SpatialHash::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.8 Low EPSS < 1% KEV · Not listed
Description
Data::SpatialHash::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 sphash.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::SpatialHash::Shared writes a shared memory segment to a file created with mode 0666 and without O_NOFOLLOW or O_EXCL. This results in a world‑readable file that can be accessed by any local user. A local attacker can also place a symbolic link or precreate a file at the expected location, causing the program to open that target instead of the intended backing file. The consequence is that the attacker can read the contents of the shared memory region, potentially disclosing sensitive information stored there.

Affected Systems

The flaw exists in all releases of Data::SpatialHash::Shared distributed by EGOR before version 0.02. Perl applications that import this module and use its shared storage feature are affected. No other products or vendors are listed as impacted.

Risk and Exploitability

The CVSS score is 3.8, indicating a low to medium severity. The EPSS score of less than 1% suggests that exploitation is unlikely at present, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires local user access and an active race or symlink attack, so only users who have write or execution privileges on the directories where the backing file is created can exploit the issue. Under normal circumstances, the risk is the potential for local confidentiality compromise rather than remote or privileged escalation.

Remediation

Vendor Solution

Upgrade to Data::SpatialHash::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::SpatialHash::Shared to version 0.02 or later.
  • If an upgrade is not possible, configure a restrictive umask such as 077 so that the created file is not world‑readable.
  • Place the shared memory backing file in a directory that is only accessible to the owning user, for example a user‑specific temporary directory.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Egor
Egor data::spatialhash::shared
Vendors & Products Egor
Egor data::spatialhash::shared
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'}

Type Values Removed Values Added
Description Data::SpatialHash::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 sphash.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::SpatialHash::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 23, 2026, 1:18 PM
Reserved
Jul 21, 2026, 3:29 PM
Status
Deferred
Published
Jul 21, 2026, 8:17 PM
Modified
Oct 24, 2026, 7:10 PM