CVE catalog

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 Thre

[CVE catalog]

Severity
High · CVSS 7.3CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published
Source
[NVD] · [CVE record]
EPSS
0.24% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Cpellama.cppNot reportedNot reportedunknown
Debianllama.cpp145151+dfsg-1~exp2vulnerable
Debianllama.cpp145151+dfsg-1~exp3vulnerable
Debianllama.cpp145318+dfsg-1vulnerable
Debianllama.cpp145318+dfsg-2vulnerable
Debianllama.cpp145713+dfsg-1vulnerable
Debianllama.cpp145760+dfsg-1vulnerable
Debianllama.cpp145760+dfsg-2vulnerable
Debianllama.cpp145760+dfsg-3vulnerable
Debianllama.cpp145760+dfsg-4vulnerable
Debianllama.cpp145882+dfsg-1vulnerable
Debianllama.cpp145882+dfsg-2vulnerable
Debianllama.cpp145882+dfsg-3vulnerable
Debianllama.cpp145882+dfsg-3~exp1vulnerable
Debianllama.cpp145882+dfsg-3~exp2vulnerable
Debianllama.cpp145882+dfsg-3~exp3vulnerable
Debianllama.cpp145882+dfsg-4vulnerable
Debianllama.cpp146641+dfsg-1vulnerable
Debianllama.cpp146641+dfsg-2vulnerable
Debianllama.cpp146641+dfsg-3vulnerable
Debianllama.cpp147593+dfsg-1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianllama.cppdeb147593+dfsg-1Not reportedDEBIAN-CVE-2026-70640Not reported

OpenFactory catalog packages

No matching packages in this catalog.

Observed:

References