{"identifier":"CVE-2026-70640","cve":{"id":"CVE-2026-70640","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.","published":"2026-08-06T22:18:28.927000+00:00","modified":"2026-11-13T22:17:25.807000+00:00","status":"Modified","score":7.3,"severity":"HIGH","vector":"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","cvss_version":"4.0","affected":[{"criteria":"cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*","versionStartIncluding":"b1886","versionStartExcluding":"","versionEndIncluding":"b7445","versionEndExcluding":""}],"weaknesses":["CWE-362","CWE-476"],"references":[{"url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","source":"disclosure@vulncheck.com","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388","source":"disclosure@vulncheck.com","tags":["Patch"]},{"url":"https://github.com/ggml-org/llama.cpp/releases/tag/b7446","source":"disclosure@vulncheck.com","tags":["Patch","Release Notes","Vendor Advisory"]},{"url":"https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-race-condition-use-after-free-via-llama-android-cpp","source":"disclosure@vulncheck.com","tags":["Exploit","Third Party Advisory"]},{"url":"https://www.cyera.com/research/breaking-local-ai-runtimes-10-vulnerabilities-in-the-engine-behind-your-open-source-models","source":"af854a3a-2127-422b-91ae-364da2661108"},{"url":"https://www.youtube.com/watch?v=_FKX5hDwgVE&t=1079s","source":"af854a3a-2127-422b-91ae-364da2661108"}],"kev":null,"kev_checked":true,"metrics":{"cvssMetricV40":[{"source":"disclosure@vulncheck.com","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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","baseScore":7.3,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"PASSIVE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"cvssMetricV31":[{"source":"disclosure@vulncheck.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H","baseScore":7.0,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"REQUIRED","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.0,"impactScore":5.9}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-08-07T16:18:29.875187Z","id":"CVE-2026-70640","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*","versionStartIncluding":"b1886","versionEndIncluding":"b7445","matchCriteriaId":"705D1F59-D387-4A8D-8A68-C87950E4AA5A"}]}]}],"source":"nvd","retrieved_at":"2026-11-14T00:39:31.131997+00:00","exploited":false,"kev_stale":false,"products":["ggml / llama.cpp"],"priority":{"label":"Assess exposure and vendor guidance","reasons":["No higher-priority signal is available in the current stored evidence."]},"epss":{"probability":0.0024,"percentile":0.15239,"date":"2026-11-18","stale":false},"version_assessment":null},"news":[],"campaigns":[],"domains":[{"domain":"github.com","source_url":"https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches","investigate_url":"https://investigate.aeglixmind.com/#github.com"},{"domain":"www.vulncheck.com","source_url":"https://www.vulncheck.com/advisories/llama-cpp-b1886-b7445-race-condition-use-after-free-via-llama-android-cpp","investigate_url":"https://investigate.aeglixmind.com/#www.vulncheck.com"},{"domain":"www.cyera.com","source_url":"https://www.cyera.com/research/breaking-local-ai-runtimes-10-vulnerabilities-in-the-engine-behind-your-open-source-models","investigate_url":"https://investigate.aeglixmind.com/#www.cyera.com"},{"domain":"www.youtube.com","source_url":"https://www.youtube.com/watch?v=_FKX5hDwgVE&t=1079s","investigate_url":"https://investigate.aeglixmind.com/#www.youtube.com"}],"arsenal_url":"https://arsenal.aeglixmind.com/?cve=CVE-2026-70640","catalog_url":"https://cves.aeglixmind.com/cve/CVE-2026-70640","research_url":"https://investigate.aeglixmind.com/research/cve/CVE-2026-70640","coverage":{"news_candidates_checked":0,"campaign_candidates_checked":0,"bounded":false,"notice":"Exact CVE mentions in stored public excerpts and reviewed campaign content only. A mention is not proof of exploitation, attribution or tool suitability. Missing matches do not establish absence."}}