{"id":"CVE-2026-43629","revision":"a4ea8682d7764742a352099815da4115","records":[{"revision":"a4ea8682d7764742a352099815da4115","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-43629","aliases":[],"title":"llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore","description":"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.","state":0,"publishedAt":"2026-08-06T15:48:41.246+00:00","modifiedAt":"2026-08-14T16:49:54.546+00:00","affected":[{"ecosystem":"Vendor product","name":"llama.cpp","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"ggml-org\",\n                    \"product\": \"llama.cpp\",\n                    \"versions\": [\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"b4882\",\n                            \"lessThanOrEqual\": \"b9058\",\n                            \"versionType\": \"custom\"\n                        },\n                        {\n                            \"status\": \"affected\",\n                            \"version\": \"0.16.1\",\n                            \"lessThanOrEqual\": \"0.17.1\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"defaultStatus\": \"affected\"\n                }"}],"metrics":[{"system":"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,"severity":"CRITICAL"},{"system":"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,"severity":"HIGH"}],"references":["https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restore"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-43629","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-43629","identifiers":["CVE-2026-43629"]},"retained":false,"historicalAffected":[]}],"coverage":[]}