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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain local write access to shared backing file
  2. Delivery
    Poison bucket/next/free_head indices, keep header valid
  3. Exploit
    Victim process queries or inserts
  4. Execution
    Out-of-bounds read/write through unbounded index
  5. Impact
    Memory corruption or process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires a local peer that can write the shared memory-mapped backing file used by Data::SpatialHash::Shared - filesystem write access to that specific file is the concrete prerequisite. The attacker poisons the array contents (a buckets[] head index, an entry next link, or the free_head free-list index) while keeping sph_validate_header's header/region checks satisfied. Exploitation is not self-triggering: a separate consumer process must perform a query (sph_walk_cell) to trigger the out-of-bounds read or an insert (sph_alloc_slot) to trigger the out-of-bounds write - this is the UI:R (user interaction) limiter. Limiting factors: local access only (AV:L, no network path), the required write permission on the shared file (not present under properly restricted permissions), the need for a victim process to operate on the poisoned file, and affected versions being strictly below 0.02.

Impact

The NVD CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H yields 7.8 (High), driven by full C/I/A impact from memory corruption but gated by local attack vector (AV:L) and required user interaction (UI:R - a victim process must query or insert against the poisoned file). This is a genuine memory-safety defect, but its real-world risk is bounded: exploitation is not remote and not automatable in the usual sense - it presupposes an attacker who can already write the shared backing file, i.e. a co-located local peer sharing that resource. The low EPSS (0.17%, 7th percentile) and absence from CISA KEV are consistent with a niche local-only bug rather than an internet-facing threat. Note a tension worth flagging: the CVSS marks PR:N (no privileges), yet the description's precondition - 'a local peer that can write the backing file' - is itself a meaningful access requirement that PR:N does not capture; defenders should treat filesystem write access to the shared file as the true gate. Weaponizing generic out-of-bounds writes into reliable code execution is non-trivial, so crash/DoS and integrity corruption are the most likely practical outcomes.

Exploit ScenarioDerived

On a multi-user host, a low-privileged local user with write access to the shared backing file leaves the header fields valid but rewrites a bucket head (or an entry's next link, or free_head) to point outside the entries table. When a higher-privileged process later runs a lookup via sph_walk_cell or an insert via sph_alloc_slot, it reads or writes through the out-of-bounds index, corrupting its memory or crashing it. No public exploit code is currently identified, and reliable code execution would require additional heap-layout control.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 22, 2026

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.

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.

Affected VersionsENISA

Data::SpatialHash::Shared 0 <0.02

Affected Packages

euvd data_spatialhash_shared fix: 0.02

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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:*.

Know when Data gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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

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

Executive ViewAI

Why It Matters

Perl module Data::SpatialHash::Shared (before version 0.02) contains a memory corruption vulnerability affecting any process using the module. A local peer with write access to the shared backing file can corrupt memory in running processes, creating risks of data integrity loss and service disruption for applications dependent on this module.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Rare
obscure single-author CPAN module, negligible enterprise deployment footprint
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

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

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