Heap Buffer Overflow in llama.cpp by Cyera
CVE-2026-43629

9.2CRITICAL

Key Information:

Vendor

Ggml-org

Status
Vendor
CVE Published:
6 August 2026

What is CVE-2026-43629?

The vulnerability in llama.cpp introduces a heap buffer overflow in the KV cache state restore path. Specifically, the state_read_data() function computes the write size without adequate overflow checks. This flaw permits unauthorized attackers, equipped with write access to the slot_save_path directory, to corrupt the heap memory. By crafting specially designed state files, attackers can manipulate the cell_count multiplication, causing it to overflow or exceed the predefined tensor buffer allocation. This exploitation can lead to the writing of attacker-controlled bytes beyond buffer limits, which may potentially corrupt heap metadata, compromise model weights, or enable arbitrary code execution through function pointer modifications.

Affected Version(s)

llama.cpp b4882

llama.cpp b4882

llama.cpp 0.16.1 <= 0.17.1

References

CVSS V4

Score:
9.2
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
None

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Vladimir Tokarev (@G1ND1L4) - Vulnerability Research Tech Lead, Cyera
Ofek Itach (@ofekitach) - Security Research Team Lead, Cyera
.