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

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.

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

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

History

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

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

Thu, 23 Jul 2026 14: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::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

Subscriptions

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

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-23T13:18:33.180Z

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

Link: CVE-2026-65068

cve-icon Vulnrichment

Updated: 2026-07-23T13:18:17.199Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-65068

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