CVE-2026-59146 Memory corruption in Data::SpatialHash::Shared

High 7.8 Published Updated

A local attacker with file write access can trigger out-of-bounds reads and writes in the Perl Data::SpatialHash::Shared library, leading to memory corruption or crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-59146?

CVE-2026-59146 is a high-severity memory corruption vulnerability in EGOR Data::SpatialHash::Shared, published on 21 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-787, CWE-125

Which versions are affected by CVE-2026-59146?

How do I fix CVE-2026-59146?

No fix has been published for CVE-2026-59146 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-59146 being exploited?

There is no known exploitation of CVE-2026-59146 in the wild and no public exploit code.

Sources

Also known as GHSA-p5xm-h38r-4xmg.

Is CVE-2026-59146 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free