# CVE-2026-43629: llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore

- Severity: Critical 9.2 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 49% of CVEs (2026-11-30)
- Published: 2026-08-06T15:48:41.246Z
- Modified: 2026-10-29T21:17:23.650Z
- Weaknesses: CWE-190, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- ggml-org llama.cpp: from b4882 up to b9058
- ggml llama.cpp: from b4882 up to b9058

## Every score

- VulnCheck: CVSS:4.0 9.2 Critical `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`
- VulnCheck: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches> (mitigation, patch, third-party-advisory)
- <https://www.vulncheck.com/advisories/llama-cpp-b4882-b9058-buffer-overflow-in-kv-cache-state-restore> (mitigation, patch, third-party-advisory)

## Sources

- CVE List: [CVE-2026-43629](https://www.cve.org/CVERecord?id=CVE-2026-43629), CVE Terms of Use, modified 2026-10-29
- NVD: [CVE-2026-43629](https://nvd.nist.gov/vuln/detail/CVE-2026-43629), Public domain, modified 2026-10-29

---

Page: https://cve.day/CVE-2026-43629 · Whole record: https://cve.day/CVE-2026-43629.json · Rebuilt by cve.day 2026-11-25T22:59:31.353Z
