CVE-2026-59146
JSON

7.8high

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

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.14% (higher than 3% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
CPANSec

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.

Affected

Product or packageVersionsReported by
Data-SpatialHash-Sharedbefore 0.02CVE List

Classification

CWE-125CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Versiones de Data::SpatialHash::Shared anteriores a la 0.02 para Perl permiten lecturas y escrituras fuera de límites a través de índices de cubo, enlace y lista de libres no validados en sph_walk_cell y sph_alloc_slot. El validador en tiempo de adjunción sph_validate_header verifica los escalares del encabezado y la disposición de la región contra el tamaño del archivo, pero no valida el contenido del array en el que luego confía. sph_walk_cell lee entries[buckets[b]] y sigue el enlace ’next’ de cada entrada en bruto, y sph_alloc_slot escribe a través de un índice free_head almacenado en archivo, ninguno acotado contra el recuento de entradas (max_entries). Un par local que puede escribir el archivo subyacente puede dejar el encabezado válido mientras envenena la cadena de cubos y la lista de libres, de modo que una consulta lee a través de un cubo y un índice ’next’ fuera de límites y una inserción escribe a través de una cabecera de lista de libres fuera de límites, corrompiendo la memoria o bloqueando el proceso.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-59146 changed 2026-07-22CVE Terms of Use
NVDCVE-2026-59146 changed 2026-10-24Public domain