{"id":"CVE-2026-43629","aliases":["CVE-2026-43629"],"related":[],"kind":"vulnerability","state":"published","title":"llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore","summary":"llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the state_read_data() function computes write size without overflow checking, allowing attackers with write access to the slot_save_path directory to corrupt heap memory. Attackers can craft malicious state files where cell_count multiplication overflows or exceeds tensor buffer allocation to write attacker-controlled bytes past buffer boundaries, potentially resulting in heap metadata corruption, model weight corruption, or arbitrary code execution via function pointer overwrite.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the state_read_data() function computes write size without overflow checking, allowing attackers with write access to the slot_save_path directory to corrupt heap memory. Attackers can craft malicious state files where cell_count multiplication overflows or exceeds tensor buffer allocation to write attacker-controlled bytes past buffer boundaries, potentially resulting in heap metadata corruption, model weight corruption, or arbitrary code execution via function pointer overwrite.","source":"cvelist"},{"lang":"es","text":"Las compilaciones b4882 a b9058 de llama.cpp contienen una vulnerabilidad de desbordamiento de búfer de montón en la ruta de restauración del estado de la caché KV, donde la función state_read_data() calcula el tamaño de escritura sin verificación de desbordamiento, permitiendo a los atacantes con acceso de escritura al directorio slot_save_path corromper la memoria del montón. Los atacantes pueden crear archivos de estado maliciosos donde la multiplicación de cell_count desborda o excede la asignación del búfer del tensor para escribir bytes controlados por el atacante más allá de los límites del búfer, lo que podría resultar en corrupción de metadatos del montón, corrupción de pesos del modelo o ejecución de código arbitrario mediante la sobrescritura de punteros de función.","source":"nvd"}],"published":"2026-08-06T15:48:41.246Z","modified":"2026-10-29T21:17:23.650Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.2,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-190","CWE-787"],"affected":[{"ranges":[{"type":"custom","introduced":"b4882","lastAffected":"b9058","status":"affected"}],"vendor":"ggml-org","product":"llama.cpp","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"b4882","lastAffected":"b9058"}],"vendor":"ggml","product":"llama.cpp","cpe":"cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","tags":["mitigation","patch","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restore","tags":["mitigation","patch","third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["Vladimir Tokarev (@G1ND1L4) - Vulnerability Research Tech Lead, Cyera","Ofek Itach (@ofekitach) - Security Research Team Lead, Cyera"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-07T15:39:29.511Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43629","url":"https://www.cve.org/CVERecord?id=CVE-2026-43629","licence":"CVE Terms of Use","modified":"2026-10-29T21:15:41.205Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43629","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43629","licence":"Public domain","modified":"2026-10-29T21:17:23.650Z"}],"updatedAt":"2026-11-25T22:59:31.353Z","epss":{"score":0.00698,"percentile":0.48659,"date":"2026-11-30T12:00:22.000Z"}}