ggml-org llama.cpp up to 0.17.1/b7445 LLaMA-Android JNI Wrapper clear use after free

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.0$0-$5k1.58

Summaryinfo

A vulnerability labeled as critical has been found in ggml-org llama.cpp up to 0.17.1/b7445. This affects the function llama_batch_allocr::clear of the component LLaMA-Android JNI Wrapper. Executing a manipulation can lead to use after free. This vulnerability is tracked as CVE-2026-70640. The attack can be launched remotely. No exploit exists.

Detailsinfo

A vulnerability was found in ggml-org llama.cpp up to 0.17.1/b7445. It has been declared as critical. This vulnerability affects the function llama_batch_allocr::clear of the component LLaMA-Android JNI Wrapper. The manipulation with an unknown input leads to a use after free vulnerability. The CWE definition for the vulnerability is CWE-416. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:

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.

The advisory is shared for download at github.com. This vulnerability was named CVE-2026-70640 since 08/04/2026. The exploitation appears to be easy. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. There are known technical details, but no exploit is available.

Applying the patch 5c0d18881e0e9794c96b2602736b758bac9d9388 is able to eliminate this problem.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Productinfo

Vendor

Name

Version

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.3
VulDB Meta Temp Score: 7.0

VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Use after free
CWE: CWE-416 / CWE-119
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Yes

Availability: 🔒
Status: Not defined
Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔒

Patch: 5c0d18881e0e9794c96b2602736b758bac9d9388

Timelineinfo

08/04/2026 CVE reserved
08/07/2026 +3 days Advisory disclosed
08/07/2026 +0 days VulDB entry created
08/07/2026 +0 days VulDB entry last update

Sourcesinfo

Product: github.com

Advisory: github.com
Status: Confirmed

CVE: CVE-2026-70640 (🔒)
GCVE (CVE): GCVE-0-2026-70640
GCVE (VulDB): GCVE-100-386872

Entryinfo

Created: 08/07/2026 02:41
Changes: 08/07/2026 02:41 (56)
Complete: 🔍
Cache ID: 216::103

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!