{"id":"CVE-2026-70640","published":"2026-08-06T15:38:22Z","modified":"2026-11-13T21:26:51Z","title":"llama.cpp b1886–b7445 Race Condition Use-After-Free via llama-android.cpp","vendor":"ggml-org","product":"llama.cpp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0024,"percentile":0.154,"provenance":"source"},"cwes":[{"id":"CWE-476","name":"NULL Pointer Dereference"},{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"}],"references":[{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b7446","tags":["release-notes"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388","tags":["patch"]},{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","tags":["related"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-race-condition-use-after-free-via-llama-android-cpp","tags":["third-party-advisory"]},{"url":"https://www.youtube.com/watch?v=_FKX5hDwgVE&t=1079s","tags":[]},{"url":"https://www.cyera.com/research/breaking-local-ai-runtimes-10-vulnerabilities-in-the-engine-behind-your-open-source-models","tags":[]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":3.08},{"name":"CVSS severity","points":4.9}]},"vendorSlug":"ggml-org","affectedVersions":[{"vendor":"ggml-org","product":"llama.cpp","versions":[">= b1886, <= b7445"]}],"fixedVersions":[{"vendor":"ggml-org","product":"llama.cpp","versions":["5c0d18881e0e9794c96b2602736b758bac9d9388"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-08-07T16:18:29.875187Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-54280","exploited":false,"provenance":"source"}}