{"id":"CVE-2026-59146","published":"2026-07-21T19:04:56Z","modified":"2026-07-22T19:36:54Z","title":"Data::SpatialHash::Shared versions before 0.02 for Perl allow out-of-bounds reads and writes via unvalidated bucket…","vendor":"EGOR","product":"Data::SpatialHash::Shared","tier":"tail","description":{"text":"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.\n\nThe 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).\n\nA 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00174,"percentile":0.07019,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://metacpan.org/release/EGOR/Data-SpatialHash-Shared-0.02/diff/EGOR/Data-SpatialHash-Shared-0.01#sphash.h","tags":[]},{"url":"https://metacpan.org/release/EGOR/Data-SpatialHash-Shared-0.02/changes","tags":["release-notes"]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":1.4},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"egor","affectedVersions":[{"vendor":"EGOR","product":"Data::SpatialHash::Shared","versions":["< 0.02"]}],"solutions":{"items":["Upgrade to Data::SpatialHash::Shared 0.02 or later, which bounds every entry index against the entry count before dereferencing it."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["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 bucket chain and free list."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-07-22T19:36:20.230490Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-46367","exploited":false,"provenance":"source"}}