Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-70640: CWE-476 NULL Pointer Dereference in ggml-org llama.cpp

0
High
VulnerabilityCVE-2026-70640cvecve-2026-70640cwe-476cwe-362
Published: 08/06/2026 (08/06/2026, 15:38:22 UTC)
Source: CVE Database V5
Vendor/Project: ggml-org
Product: llama.cpp

Description

A race condition use-after-free vulnerability exists in llama.cpp builds b1886 through 0.9.0 in the LLaMA-Android JNI wrapper. The functions bench_1model() and free_1context() lack synchronization, allowing concurrent access to freed memory. This can be exploited by attackers to hijack a vtable pointer, leading to arbitrary memory dereference and potential remote code execution. The vulnerability has a CVSS 4.0 score of 7.3, indicating high severity. No official patch or remediation guidance is currently available.

CVSS v4.0

Score 7.3high

Attack Vector
Local
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

GitHub Actionsmore threats →ai
ggml-org/llama.cpp
pkg:github/ggml-org/llama.cpp
Affected versions
=0.9.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/06/2026, 22:26:55 UTC

Technical Analysis

llama.cpp versions b1886 and 0.9.0 contain a race condition use-after-free vulnerability in the LLaMA-Android JNI wrapper. The lack of synchronization between bench_1model() and free_1context() allows Thread A to operate on memory freed by Thread B concurrently. Attackers can exploit this by performing a heap spray with attacker-controlled data containing a fake vtable to hijack the vtable pointer at offset +0x30. This causes llama_batch_allocr::clear() to dereference arbitrary memory, enabling remote code execution.

Potential Impact

Successful exploitation allows an attacker to achieve remote code execution by hijacking the vtable pointer and causing arbitrary memory dereference. This can compromise the affected system running vulnerable versions of llama.cpp, potentially leading to full system compromise or unauthorized code execution within the context of the application.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid running vulnerable versions b1886 and 0.9.0 of llama.cpp in environments where untrusted input can trigger the JNI wrapper. Monitor vendor channels for updates and apply patches promptly once released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-08-04T20:17:18.298Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a75070dbf8831d5395f5c7b

Added to database: 08/06/2026, 22:13:33 UTC

Last enriched: 08/06/2026, 22:26:55 UTC

Last updated: 08/07/2026, 02:25:30 UTC

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses