CVE-2026-70640
llama.cpp builds b1886 through b7445 contain a race condition use-after-free vulnerability in the LLaMA-Android JNI wrapper where bench_1model() and free_1context() lack synchronization, allowing Thread A to operate on freed memory while Thread B concurrently frees the llama_context. Attackers can exploit this by performing heap spray with attacker-controlled data containing a fake vtable to hijack the vtable pointer at offset +0x30, causing llama_batch_allocr::clear() to dereference arbitrary memory and achieve remote code execution.
Published:Aug 6, 2026
Last Modified:Aug 14, 2026
EPS:Aug 6, 2026
EPSS Score:0.0016
CVSS Score:7
Affected Products
Vendor
Product
Action
Vendor
Ggml
Product
Llama.cpp
Ggml
Llama.cpp
Vendor
Ggml-org
Product
Llama.cpp
Ggml-org
Llama.cpp
Exploits
No exploit reference
Common Weakness Enumeration
Common Attack Pattern Enumeration and Classification (CAPEC)
Related CVEs
References
Common Vulnerability Scoring System
Attack Vector
Network
Adjacent
Local
Physical
Privileges Required
None
Low
High
User Interaction
None
Required
Scope
Unchanged
Changed
Confidentiality
None
Low
High
Integrity
None
Low
High
Availability
None
Low
High
