CVE-2026-43629: llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore
llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the statereaddata() function computes write size without overflow checking, allowing attackers with write access to the slotsavepath directory to corrupt heap memory. Attackers can craft malicious state files where cellcount 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.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-43629?
CVE-2026-43629 has a severity rating of 8.1, categorized as high.
What type of vulnerability is CVE-2026-43629?
CVE-2026-43629 is a heap buffer overflow vulnerability that occurs during the KV cache state restore process.
How do I fix CVE-2026-43629?
To fix CVE-2026-43629, ensure that you update to a patched version of llama.cpp that addresses the buffer overflow issue.
What are the potential impacts of CVE-2026-43629?
Exploitation of CVE-2026-43629 could lead to heap memory corruption, potentially allowing attackers with write access to disrupt system functionality.
Who is affected by CVE-2026-43629?
Users of llama.cpp builds from b4882 through b9058 are affected by CVE-2026-43629.