Description
Data::DisjointSet::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 dsu.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: 4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Data::DisjointSet::Shared module creates a memory‑mapped backing file by opening it with open(path, O_RDWR|O_CREAT, 0666). Because the mode is 0666, the default umask of 022 results in a file that is world‑readable, and because the open call omits O_EXCL and O_NOFOLLOW a symlink can be planted at that path. An attacker who can write to the shared directory or create a symlink therefore can read or substitute the backing file. The result is that any local user can view or tamper with the IPC payloads stored in the segment, a violation of critical permission assignment (CWE‑732) and a form of path traversal or symlink attack (CWE‑59).

Affected Systems

Any system that installs EGOR's Data::DisjointSet::Shared before version 0.02 is vulnerable. This includes typical Unix or Linux environments where Perl scripts using shared disjoint set data structures are executed. The issue arises when the module creates its backing file in a shared directory such as /tmp or /dev/shm, which is globally writable by all users. Consequently, all unprivileged users on the host can read or alter the data stored in the shared segment.

Risk and Exploitability

The CVSS score of 4.0 indicates a low severity and the EPSS score being below 1 % suggests that exploitation is unlikely in practice. The vulnerability is not listed in CISA’s KEV catalog. Nonetheless, because the vulnerability relies on local file system operations, a local attacker with the ability to create a file or symlink at the designated path can walk the pre‑creation race or seize control of the file. The exploit path is straightforward: create a symlink or pre‑create the target file in a world‑writable directory and then run the Perl application. The absence of O_EXCL and O_NOFOLLOW allows the attack to succeed without error.

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

Remediation

Vendor Solution

Upgrade to Data::DisjointSet::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::DisjointSet::Shared to version 0.02 or newer, which creates the backing file with mode 0600 and uses O_EXCL and O_NOFOLLOW.
  • If upgrade is not possible, set a restrictive umask (e.g., 077) before invoking the Perl scripts and ensure the directory that holds the segment is owned by the application user and not world writable.
  • Remove any existing world‑readable backing files that were created by older versions in shared directories such as /tmp or /dev/shm, and secure them or delete them to eliminate the exposed data.

Generated by OpenCVE AI on August 4, 2026 at 05:28 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::disjointset::shared
Vendors & Products Egor
Egor data::disjointset::shared

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

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/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::DisjointSet::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 dsu.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::DisjointSet::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::disjointset::shared
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-23T13:22:20.294Z

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

Link: CVE-2026-65069

cve-icon Vulnrichment

Updated: 2026-07-23T13:21:23.591Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-65069

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T05:30:04Z

Weaknesses
  • CWE-59

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

  • CWE-732

    Incorrect Permission Assignment for Critical Resource