CVE-2026-70640
Last modified
CVE-2026-70640 is a high-severity vulnerability rated 7.3/10 on the CVSS scale. 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.. EPSS estimates a 0.16% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS: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
Weakness Enumeration
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| ggml-org | llama.cpp | >= b1886, <= b7445; >= 0.9.0, <= 0.17.1 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-70640?
How severe is CVE-2026-70640?
How do I fix CVE-2026-70640?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-70635TimescaleDB through 2.29.1, fixed in commit 517c13e, contain…7.1
- CVE-2026-70636Flowise through 3.1.4 contains an authentication bypass vuln…8.7
- CVE-2026-70637LightFTP through 2.4 contains multiple data race vulnerabili…8.2
- CVE-2026-70638llama.cpp builds b1886 through b7445 contain an integer over…8.5
- CVE-2026-70639llama.cpp builds b1886 through b7445 contain a null pointer …6.8
- CVE-2026-7064A flaw has been found in AgentDeskAI browser-tools-mcp up to…7.3
- CVE-2026-70646aiosend is a synchronous and asynchronous Crypto Pay API cli…7.5
- CVE-2026-7065A vulnerability has been found in BidingCC BuildingAI up to …7.3
- CVE-2026-7066A vulnerability was found in choieastsea simple-openstack-mc…7.3
- CVE-2026-7067A vulnerability was determined in D-Link DIR-822 A_101. The …7.3
- CVE-2026-7068A vulnerability was identified in D-Link DIR-825 3.00b32. Th…8.8
- CVE-2026-7069A security flaw has been discovered in D-Link DIR-825 up to …8
Are you affected by CVE-2026-70640?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
