← Back to CVE Explorer

CVE-2026-59146

Full vulnerability record from the local CVENow database.

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.

Severity
HIGH
CVSS score
7.8 (v3.1)
Vulnerability status
Deferred
Source identifier
9b29abf9-4ab0-4765-b253-1875cd9b441e
Published
2026-07-21 20:17:03.407000
Last modified
2026-10-24 19:10:00.127000
View original CVE JSON
{
  "id": "CVE-2026-59146",
  "sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
  "published": "2026-07-21T20:17:03.407",
  "lastModified": "2026-10-24T19:10:00.127",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "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.\n\nEl 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).\n\nUn 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."
    }
  ],
  "affected": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "affectedData": [
        {
          "vendor": "EGOR",
          "product": "Data::SpatialHash::Shared",
          "defaultStatus": "unaffected",
          "collectionURL": "https://cpan.org/modules",
          "packageName": "Data-SpatialHash-Shared",
          "programFiles": [
            "sphash.h"
          ],
          "programRoutines": [
            {
              "name": "sph_walk_cell"
            },
            {
              "name": "sph_alloc_slot"
            }
          ],
          "repo": "https://github.com/vividsnow/perl5-data-spatialhash-shared",
          "versions": [
            {
              "version": "0",
              "lessThan": "0.02",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
          "baseScore": 7.8,
          "baseSeverity": "HIGH",
          "attackVector": "LOCAL",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "HIGH"
        },
        "exploitabilityScore": 1.8,
        "impactScore": 5.9
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-22T19:36:20.230490Z",
          "id": "CVE-2026-59146",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-125"
        },
        {
          "lang": "en",
          "value": "CWE-787"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://metacpan.org/release/EGOR/Data-SpatialHash-Shared-0.02/changes",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    },
    {
      "url": "https://metacpan.org/release/EGOR/Data-SpatialHash-Shared-0.02/diff/EGOR/Data-SpatialHash-Shared-0.01#sphash.h",
      "source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
    }
  ]
}