CVE-2026-59147

Data::DisjointSet::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via an unvalidated parent index in dsu_find

Published Jul 21, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
Data::DisjointSet::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via an unvalidated parent index in dsu_find.

The attach-time validator dsu_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. dsu_find walks and path-compresses parent[x] with x a raw file-stored index never bounded against the node count, so both the read and the compression write-back land out of bounds.

A local peer that can write the backing file can leave the header valid while poisoning the parent array, so the next find or union both reads and writes through an out-of-bounds parent index, corrupting memory or crashing the process.

Analysis

AI-generated

Technical impact

The vulnerability resides in Data::DisjointSet::Shared versions before 0.02. The dsu_find routine walks a parent array using an index derived directly from the module’s backing file without checking that it is within the bounds of the node count. The attach‑time validator dsu_validate_header verifies only the header scalars and the layout against the file size, but it does not validate the contents of the parent array it then trusts. Based on the description, it is inferred that a local actor with write access to the backing file is the attack vector; such an actor can corrupt the parent array while keeping the header valid. The next call to dsu_find or dsu_union will then read and write out‑of‑bounds, corrupting adjacent memory or causing a crash. The underlying weakness is a classic buffer overrun (CWE‑125) compounded by an unchecked write (CWE‑787).

Affected Systems

All installations of the EGOR Data::DisjointSet::Shared Perl module before version 0.02 are affected. Applications that rely on the module to maintain a disjoint‑set data structure and persist its state in a shared backing file are vulnerable.

Risk and Exploitability

The CVSS score of 9.8 indicates a high‑severity security issue, yet the EPSS score of less than 1% points to a low probability of exploitation at this time. The vulnerability requires a local user who can write to the backing file; systems that expose this file to users beyond the owning account increase the risk. The vulnerability is not presently listed in the CISA KEV catalog, but its severity warrants prompt attention.

Remediation

Vendor Solution

Upgrade to Data::DisjointSet::Shared 0.02 or later, which bounds every parent index against the node count before using it.


Vendor Workaround

For deployments that cannot upgrade to 0.02, place the backing file in a directory writable only by the owning user, so a local peer cannot tamper with the parent array that find and union traverse.


OpenCVE Recommended Actions

  • Upgrade to Data::DisjointSet::Shared 0.02 or later, which bounds every parent index against the node count before using it.
  • If an upgrade is not yet possible, move the backing file to a directory that is writable only by the owning user, ensuring that no other local user can tamper with the parent array.
  • Re‑configure file system permissions so that only the process’s user can write to the directory containing the backing file, thereby preventing unauthorized modifications.

Generated by OpenCVE AI on August 3, 2026 at 00:29 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::disjointset::shared
Vendors & Products Egor
Egor data::disjointset::shared
Type Values Removed Values Added
Metrics cvssV3_1

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

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Data::DisjointSet::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via an unvalidated parent index in dsu_find. The attach-time validator dsu_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. dsu_find walks and path-compresses parent[x] with x a raw file-stored index never bounded against the node count, so both the read and the compression write-back land out of bounds. A local peer that can write the backing file can leave the header valid while poisoning the parent array, so the next find or union both reads and writes through an out-of-bounds parent index, corrupting memory or crashing the process.
Title Data::DisjointSet::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via an unvalidated parent index in dsu_find
Weaknesses CWE-125
CWE-787
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Jul 23, 2026, 12:17 PM
Reserved
Jul 2, 2026, 4:24 PM
Status
Deferred
Published
Jul 21, 2026, 8:17 PM
Modified
Oct 24, 2026, 7:10 PM