{"id":"CVE-2026-43629","published":"2026-08-06T15:48:41Z","modified":"2026-10-29T21:15:41Z","title":"llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore","vendor":"ggml-org","product":"llama.cpp","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00698,"percentile":0.54023,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-190","name":"Integer Overflow or Wraparound"}],"references":[{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","tags":["mitigation"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restore","tags":["third-party-advisory"]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":10.8},{"name":"CVSS severity","points":5.67}]},"vendorSlug":"ggml-org","affectedVersions":[{"vendor":"ggml-org","product":"llama.cpp","versions":[">= b4882, <= b9058"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-07T15:39:29.511247Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-54284","exploited":false,"provenance":"source"}}