{"id":"CVE-2026-43629","aliases":["DEBIAN-CVE-2026-43629","EUVD-2026-54284","GHSA-7p8h-8h8j-472c","UBUNTU-CVE-2026-43629"],"status":"published","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.","severity":{"version":"4.0","score":9.2,"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00698,"percentile":0.5344,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-190","CWE-787"],"published":"2026-08-06T15:48:41Z","modified":"2026-10-31T02:31:05Z","affected":[{"source":"osv","ecosystem":"Debian:14","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10108+dfsg-1","10108+dfsg1-1","10108+dfsg1-2","10192+dfsg-1","10192+dfsg-2","10192+dfsg-2~exp1","10271+dfsg-1","10344+dfsg-1","10438+dfsg-1","1:0.1.2+dfsg-1~exp1","1:0.2.0+dfsg1-1","1:0.2.0+dfsg1-1~exp1","1:0.4.0+dfsg-1","1:0.4.1+dfsg-1","1:0.5.0+dfsg-1","1:0.5.0+dfsg-2","1:0.6.0+dfsg-1","1:0.6.0+dfsg-2","1:0.7.0+dfsg-1","1:0.7.0+dfsg-2","5151+dfsg-1~exp2","5151+dfsg-1~exp3","5318+dfsg-1","5318+dfsg-2","5713+dfsg-1","5760+dfsg-1","5760+dfsg-2","5760+dfsg-3","5760+dfsg-4","5882+dfsg-1","5882+dfsg-2","5882+dfsg-3","5882+dfsg-3~exp1","5882+dfsg-3~exp2","5882+dfsg-3~exp3","5882+dfsg-4","6641+dfsg-1","6641+dfsg-2","6641+dfsg-3","7593+dfsg-1","7593+dfsg-2","7593+dfsg-3","7965+dfsg-1","8064+dfsg-1","8064+dfsg-2","8461+dfsg-1","8611+dfsg-1","8681+dfsg-1","8870+dfsg-1","8941+dfsg-1","9009+dfsg-1","9071+dfsg-1","9190+dfsg-1","9413+dfsg-1","9555+dfsg-1","9601+dfsg-1","9721+dfsg-1","9895+dfsg-1","9895+dfsg-2","9895+dfsg-3","9951+dfsg-1","9951+dfsg-2","9951+dfsg-3"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8681+dfsg-1","9721+dfsg-1ubuntu1","10438+dfsg-1","10438+dfsg-1ubuntu1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"llama.cpp","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["5882+dfsg-2","8064+dfsg-1ubuntu1","8681+dfsg-1"]}],"products":[{"vendor":"ggml","product":"llama.cpp"},{"vendor":"ggml-org","product":"llama.cpp"}],"references":[{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","tags":["mitigation","Patch","Third Party Advisory","package","report"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restore","tags":["third-party-advisory","Mitigation","Patch","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43629","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-7p8h-8h8j-472c"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43629.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-43629","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-43629","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-43629","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2026-43629","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.","status":"published","published":"2026-08-06T15:48:41.246Z","modified":"2026-10-29T21:15:41.205Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical","assessor":"cna"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-787","CWE-190"],"updated_at":"2026-11-02T13:37:25.103021Z"}],"euvd":[{"id":"EUVD-2026-54284","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.","status":"published","published":"2026-08-06T15:48:41Z","modified":"2026-10-29T21:15:41Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical"}],"updated_at":"2026-11-02T16:59:14.250155Z"}],"ghsa":[{"id":"GHSA-7p8h-8h8j-472c","title":"llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache...","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.","status":"published","published":"2026-08-07T00:31:18Z","modified":"2026-08-07T21:30:31Z","cvss":[{"version":"4.0","score":9.2,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-190"],"updated_at":"2026-11-02T15:10:12.306859Z"}],"nvd":[{"id":"CVE-2026-43629","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.","status":"published","published":"2026-08-06T22:17:05.917Z","modified":"2026-10-29T21:17:23.65Z","cvss":[{"version":"4.0","score":9.2,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-190","CWE-787"],"updated_at":"2026-11-02T14:12:35.386166Z"}],"osv":[{"id":"CVE-2026-43629","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.","status":"published","published":"2026-08-06T15:48:41.246Z","modified":"2026-10-31T02:31:05.664123675Z","cvss":[{"version":"4.0","score":9.2,"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","level":"critical"}],"cwes":["CWE-190","CWE-787"],"updated_at":"2026-11-02T15:45:04.820169Z"},{"id":"DEBIAN-CVE-2026-43629","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.","status":"published","published":"2026-08-06T22:17:05.917Z","modified":"2026-10-30T09:49:19.514737055Z","cvss":[{"version":"4.0","score":9.2,"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical"}],"updated_at":"2026-11-02T15:45:55.669088Z"},{"id":"UBUNTU-CVE-2026-43629","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.","status":"published","published":"2026-08-06T22:17:00Z","modified":"2026-10-17T12:58:55.490020064Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.0","score":9.2,"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","level":"critical"}],"updated_at":"2026-11-02T16:56:22.075798Z"}]}}
