Description
llama.cpp builds b1886 through b7445 contain a double free vulnerability in the LLaMA-Android JNI wrapper where new_1batch() allocates memory using malloc() while free_1batch() deallocates it using the C++ delete operator, causing heap metadata corruption. Attackers can trigger this memory management mismatch to cause denial of service through process crashes or potentially achieve arbitrary code execution depending on allocator state.
Published: 2026-08-06
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises from a double free in llama.cpp, where the new_1batch() function allocates memory with malloc() while free_1batch() deallocates that memory with the C++ delete operator, corrupting heap metadata. This mismatch can cause the process to crash, resulting in denial of service, or under certain allocator states may allow an attacker to execute arbitrary code. The flaw is a classic memory management error, reflected in the identified weaknesses CWE-415 and CWE-762.

Affected Systems

Affected versions are those built between b1886 and b7445 of ggml-org:llama.cpp. No precise version list is supplied beyond this build range, so any deployment within these revisions is potentially vulnerable.

Risk and Exploitability

The CVSS score of 8.5 indicates high severity. The EPSS score is not available, making it difficult to gauge current exploitation likelihood, and the vulnerability is not listed in CISA’s KEV catalog. Attackers are likely to exploit the flaw from applications that invoke the llama-android JNI wrapper, possibly by supplying crafted batch inputs that trigger the memory deallocation mismatch. Because the flaw requires interacting with the JNI layer, the attack vector is inferred to be remote via the application interface, though the description does not explicitly state this.

Generated by OpenCVE AI on August 6, 2026 at 16:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the official patch from ggml-org by upgrading to version b7446 or newer available in the release tag b7446, which fixes the double free flaw.
  • If the patch cannot be applied immediately, disable or remove the llama-android JNI usage in the application code to prevent interaction with the vulnerable functions.
  • Execute the llama.cpp component in a sandboxed environment with least privileges, enable runtime memory protection features such as ASLR, and monitor the process for crashes to contain any adverse impact of accidental heap corruption.

Generated by OpenCVE AI on August 6, 2026 at 16:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Ggml
Ggml llama.cpp
CPEs cpe:2.3:a:ggml:llama.cpp:*:*:*:*:*:*:*:*
Vendors & Products Ggml
Ggml llama.cpp

Fri, 07 Aug 2026 19:15:00 +0000


Thu, 06 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 06 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
First Time appeared Ggml-org
Ggml-org llama.cpp
Vendors & Products Ggml-org
Ggml-org llama.cpp

Thu, 06 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Description llama.cpp builds b1886 through b7445 contain a double free vulnerability in the LLaMA-Android JNI wrapper where new_1batch() allocates memory using malloc() while free_1batch() deallocates it using the C++ delete operator, causing heap metadata corruption. Attackers can trigger this memory management mismatch to cause denial of service through process crashes or potentially achieve arbitrary code execution depending on allocator state.
Title llama.cpp b1886–b7445 Double Free via llama-android.cpp
Weaknesses CWE-415
CWE-762
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Ggml Llama.cpp
Ggml-org Llama.cpp
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T16:49:52.064Z

Reserved: 2026-05-01T18:22:45.640Z

Link: CVE-2026-43622

cve-icon Vulnrichment

Updated: 2026-08-06T18:31:52.866Z

cve-icon NVD

Status : Received

Published: 2026-08-06T16:16:42.883

Modified: 2026-08-07T19:17:43.290

Link: CVE-2026-43622

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-06T17:15:01Z

Weaknesses