CVE-2026-70640

llama.cpp b1886–b7445 Race Condition Use-After-Free via llama-android.cpp

HIGH
7
CVSS Score
Published: August 6, 2026 at 03:38 PM UTC
Updated: October 24, 2026 at 03:10 PM UTC
2 products affected across 2 vendorsLlama.cppLlama.cpp

Using llama.cpp by ggml-org?

Get instant alerts when new vulnerabilities affect llama.cpp - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

All versionsb1886 ≤ v ≤ b7445
0.9.0 ≤ v ≤ 0.17.1b1886 ≤ v ≤ b74450.9.0b1886
Vendor states this is fixed in 5c0d18881e0e9794c96b2602736b758bac9d9388 (unaffected)

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7HIGHVulnCheck
Attack Vector
LOCAL
Complexity
HIGH
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-362CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card