PT-2026-68795 · Llama.Cpp · Llama.Cpp

CVE-2026-70640

·

Published

2026-08-06

·

Updated

2026-08-07

CVSS v4.0

7.3

High

VectorAV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions llama.cpp versions b1886 through b7445
Description A race condition leads to a use-after-free issue in the LLaMA-Android JNI wrapper. This occurs because the functions bench 1model() and free 1context() lack proper synchronization, enabling one thread to operate on memory while another concurrently frees the llama context. An attacker can use heap spray with controlled data and a fake vtable to hijack the vtable pointer at offset +0x30. This results in the llama batch allocr::clear() function dereferencing arbitrary memory, which can lead to remote code execution.
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Exploit

RCE

Race Condition

NULL Pointer Dereference

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-70640

Affected Products

Llama.Cpp