CVE-2026-59142
Full vulnerability record from the local CVENow database.
Description
Data::HashMap::Shared versions before 0.14 for Perl allow an out-of-bounds read via an unvalidated arena offset and length in shm_str_copy. The attach-time validator shm_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. shm_str_copy does memcpy(dst, arena + off, len) with off and len read raw from the mmap'd segment and unbounded, on the each, keys, values, pop, shift, take, swap, drain and cursor paths. The get path bounds off and len separately and is not affected. A local peer that can write the backing file can leave the header valid while poisoning a record's offset and length, so iterating or draining the map copies a file-controlled offset and length out of the arena, reading adjacent memory or crashing the process.
View original CVE JSON
{
"id": "CVE-2026-59142",
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"published": "2026-07-21T19:17:11.800",
"lastModified": "2026-10-24T19:10:00.127",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Data::HashMap::Shared versions before 0.14 for Perl allow an out-of-bounds read via an unvalidated arena offset and length in shm_str_copy.\n\nThe attach-time validator shm_validate_header checks the header scalars and region layout against the file size, but does not validate the array contents it then trusts. shm_str_copy does memcpy(dst, arena + off, len) with off and len read raw from the mmap'd segment and unbounded, on the each, keys, values, pop, shift, take, swap, drain and cursor paths. The get path bounds off and len separately and is not affected.\n\nA local peer that can write the backing file can leave the header valid while poisoning a record's offset and length, so iterating or draining the map copies a file-controlled offset and length out of the arena, reading adjacent memory or crashing the process."
},
{
"lang": "es",
"value": "Las versiones de Data::HashMap::Shared anteriores a la 0.14 para Perl permiten una lectura fuera de límites a través de un desplazamiento y una longitud de arena no validados en shm_str_copy.\n\nEl validador en tiempo de adjunción shm_validate_header comprueba los escalares de la cabecera y el diseño de la región contra el tamaño del archivo, pero no valida el contenido del array en el que luego confía. shm_str_copy realiza memcpy(dst, arena + off, len) con ’off’ y ’len’ leídos directamente del segmento mapeado en memoria (mmap’d) y sin límites, en las rutas ’each’, ’keys’, ’values’, ’pop’, ’shift’, ’take’, ’swap’, ’drain’ y ’cursor’. La ruta ’get’ acota ’off’ y ’len’ por separado y no se ve afectada.\n\nUn par local que puede escribir el archivo de respaldo puede dejar la cabecera válida mientras envenena el desplazamiento y la longitud de un registro, de modo que al iterar o vaciar el mapa se copia un desplazamiento y una longitud controlados por el archivo fuera de la arena, leyendo memoria adyacente o provocando la caída del proceso."
}
],
"affected": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"affectedData": [
{
"vendor": "EGOR",
"product": "Data::HashMap::Shared",
"defaultStatus": "unaffected",
"collectionURL": "https://cpan.org/modules",
"packageName": "Data-HashMap-Shared",
"programFiles": [
"shm_generic.h"
],
"programRoutines": [
{
"name": "shm_str_copy"
}
],
"repo": "https://github.com/vividsnow/perl5-data-hashmap-shared",
"versions": [
{
"version": "0",
"lessThan": "0.14",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H",
"baseScore": 9.1,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 3.9,
"impactScore": 5.2
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-07-22T19:21:49.631958Z",
"id": "CVE-2026-59142",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-125"
}
]
}
],
"references": [
{
"url": "https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/changes",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://metacpan.org/release/EGOR/Data-HashMap-Shared-0.14/diff/EGOR/Data-HashMap-Shared-0.13#shm_generic.h",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
}
]
}