CVE-2026-70640: llama.cpp b1886–b7445 Race Condition Use-After-Free via llama-android.cpp

Published Aug 6, 2026
·
Updated

llama.cpp builds b1886 through b7445 contain a race condition use-after-free vulnerability in the LLaMA-Android JNI wrapper where bench1model() and free1context() lack synchronization, allowing Thread A to operate on freed memory while Thread B concurrently frees the llamacontext. 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 llamabatchallocr::clear() to dereference arbitrary memory and achieve remote code execution.

Affected Software

1 affected component
Ggerganov Llama.cpp>b1886<b7445

Event History

Aug 6, 2026
CVE Published
via MITRE·03:38 PM
Data Sourced
via MITRE·03:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:18 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-70640?

CVE-2026-70640 has a high severity rating of 7.

2

How do I fix CVE-2026-70640?

To fix CVE-2026-70640, update to the latest version of Llama.cpp that is free from this vulnerability.

3

What types of vulnerabilities does CVE-2026-70640 involve?

CVE-2026-70640 involves race conditions, use-after-free, and null pointer dereference vulnerabilities.

4

What impact does CVE-2026-70640 have on system security?

CVE-2026-70640 allows attackers to operate on freed memory, potentially leading to arbitrary code execution.

5

In which versions of Llama.cpp is CVE-2026-70640 present?

CVE-2026-70640 is present in Llama.cpp builds from version b1886 through b7445.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203