Skip to main content

Data::SpatialHash::Shared EUVDEUVD-2026-46367

| CVE-2026-59146 HIGH
Out-of-bounds Write (CWE-787)
2026-07-21 CPANSec GHSA-p5xm-h38r-4xmg
7.8
CVSS 3.1 · Vendor: CPANSec
Share

Severity by source

Vendor (CPANSec) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI
7.3 HIGH

Local only (AV:L); attacker needs write access to the shared backing file, so PR:L not PR:N; a victim must query/insert to trigger it (UI:R); memory corruption gives high C/I/A.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Generated
Jul 22, 2026 - 21:07 vuln.today
CVSS changed
Jul 22, 2026 - 20:22 NVD
7.8 (HIGH)
Patch available
Jul 21, 2026 - 21:18 EUVD
CVE Published
Jul 21, 2026 - 19:04 cve.org
UNKNOWN (no severity yet)
CVE Published
Jul 21, 2026 - 19:04 cve.org
HIGH 7.8

DescriptionCVE.org

Data::SpatialHash::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via unvalidated bucket, link and free-list indices in sph_walk_cell and sph_alloc_slot.

The attach-time validator sph_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. sph_walk_cell reads entries[buckets[b]] and follows each entry's next link raw, and sph_alloc_slot writes through a file-stored free_head index, none bounded against the entry count (max_entries).

A local peer that can write the backing file can leave the header valid while poisoning the bucket chain and free list, so a query reads through an out-of-bounds bucket and next index and an insert writes through an out-of-bounds free-list head, corrupting memory or crashing the process.

AnalysisAI

Out-of-bounds read and write in the Perl module Data::SpatialHash::Shared before 0.02 lets a local peer with write access to the shared backing file corrupt memory in any process that queries or inserts into the spatial hash. The attach-time validator sph_validate_header checks header scalars and region layout against file size but never validates the array contents it subsequently trusts, so poisoned bucket, next-link, and free-list indices flow unchecked into sph_walk_cell and sph_alloc_slot. No public exploit identified at time of analysis; EPSS is low (0.17%, 7th percentile) and the module is not in CISA KEV.

Technical ContextAI

The module implements a spatial hash grid persisted in a memory-mapped shared file so multiple Perl processes can share the structure. Internally (sphash.h) it stores an entries[] table, a buckets[] array of head indices, and a free_head index for slot allocation, all backed by the file. The root cause is CWE-787 (out-of-bounds write) compounded by out-of-bounds reads: sph_validate_header verifies only the scalar header fields and region offsets/sizes against the file length, establishing that the layout fits, but it does not bounds-check the contents of buckets[], the per-entry next links, or free_head against max_entries. sph_walk_cell dereferences entries[buckets[b]] and chases each entry's next pointer raw, and sph_alloc_slot writes through the file-stored free_head - none clamped to the entry count - so trusted-but-attacker-controlled indices become arbitrary array offsets. The affected CPE is cpe:2.3:a:egor:data::spatialhash::shared:*.

RemediationAI

Vendor-released patch: upgrade Data::SpatialHash::Shared to version 0.02 or later from CPAN (e.g. cpanm Data::SpatialHash::Shared), which adds bounds validation of the array contents; see the release changes at https://metacpan.org/release/EGOR/Data-SpatialHash-Shared-0.02/changes. Where immediate upgrade is not possible, the effective compensating control is to restrict write access to the shared backing file so that only trusted processes/users can modify it - place it on a filesystem path with tight ownership and permissions and avoid world- or group-writable shared directories (trade-off: legitimate multi-user sharing scenarios break if permissions are narrowed too far). Do not attach to or query backing files sourced from untrusted or lower-privileged peers, and consider running consumers under a separate low-privilege account so that any corruption is contained. Advisory URLs: https://vuldb.com/vuln/381031 and https://nvd.nist.gov/vuln/detail/CVE-2026-59146.

More in Data

View all
CVE-2021-29662 HIGH POC
7.5 Mar 31

The Data::Validate::IP module through 0.29 for Perl does not properly consider extraneous zero characters at the beginni

CVE-2026-59144 CRITICAL
9.8 Jul 21

Stack buffer overflow in the Perl module Data::RingBuffer::Shared before 0.04 lets a local peer with write access to the

CVE-2026-59147 CRITICAL
9.8 Jul 21

Out-of-bounds read and write in the Perl module Data::DisjointSet::Shared before version 0.02 lets a local actor who can

CVE-2026-59145 CRITICAL
9.1 Jul 21

Out-of-bounds memory disclosure in Data::Intern::Shared before 0.02, a Perl shared-memory string interning module, lets

CVE-2026-18536 HIGH
7.5 Aug 01

Entropy source compromise in Data::Entropy (Perl) before version 0.010 allows any on-path network attacker to fully cont

CVE-2026-59143 MEDIUM
6.3 Jul 21

Out-of-bounds read in Data::RoaringBitmap::Shared before version 0.02 for Perl allows a local peer with write access to

CVE-2026-64613 MEDIUM
6.2 Jul 21

World-readable mmap backing files and absent O_NOFOLLOW protection in Data::Buffer::Shared for Perl (versions before 0.0

CVE-2026-65065 MEDIUM
5.5 Jul 21

Information disclosure in Data::RoaringBitmap::Shared Perl module before 0.02 allows local attackers to read sensitive I

CVE-2026-65069 MEDIUM
4.0 Jul 21

Insecure mmap backing-file creation in Data::DisjointSet::Shared (Perl/CPAN) before 0.02 exposes inter-process IPC paylo

CVE-2026-64614 LOW
3.8 Jul 21

Information disclosure in the Perl Data::Deque::Shared module before version 0.06 exposes inter-process communication qu

CVE-2026-65068 LOW
3.8 Jul 21

World-readable IPC segment exposure in Data::SpatialHash::Shared (Perl) before version 0.02 allows any local user on a m

CVE-2026-65067 LOW
3.8 Jul 21

Insecure file creation in Data::Intern::Shared for Perl (all versions before 0.02) exposes shared memory IPC payloads to

Share

EUVD-2026-46367 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy