CVE-2026-70640
Ggml Llama.cpp remote code execution
- Published6 Aug 2026
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.
CVSS 3.1 breakdown
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:HAffected products
Remediation
No fixed version is recorded in the NVD data. Check the vendor advisory for the latest guidance.
References
- https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388
- https://github.com/ggml-org/llama.cpp/releases/tag/b7446
- https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches
- https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-race-condition-use-after-free-via-llama-android-cpp
Related CVEs
Recent high-severity vulnerabilities sharing a weakness type.
Frequently asked
Is CVE-2026-70640 being actively exploited?
CVE-2026-70640 is not in the CISA KEV catalog. A public exploit reference exists, so treat it as exploitable. Its EPSS exploit probability is 0.24%.
How severe is CVE-2026-70640?
CVE-2026-70640 has a CVSS 3.1 base score of 7.0, rated high. EPSS estimates a 0.24% probability of exploitation.
Which products are affected by CVE-2026-70640?
Affected products include Ggml Llama.cpp.
How do I fix CVE-2026-70640?
Apply the vendor's patch or advisory guidance, then verify no affected versions remain across your devices.
How Secuno handles this
Secuno correlates vulnerabilities like CVE-2026-70640 against the real software inventory on every managed device, every day. Rather than a static severity, each match is scored in context: exploit availability, EPSS, the asset's exposure, and business criticality decide where it lands in the queue. If an affected version is present anywhere across your portfolio, it surfaces automatically with a prioritised remediation path.
Data from the NVD, CISA KEV catalog and FIRST EPSS. CVSS 3.1 base score shown where available.