Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDistribute crafted GGUF model via third-party repository
-
DeliveryUser downloads and loads model into vulnerable Android app
-
ExploitMalicious n_seq_max triggers integer overflow in new_1batch()
-
ExecutionHeap underallocation computed
-
PersistOut-of-bounds write corrupts heap
-
ImpactDenial of service or arbitrary code execution within app process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a user to load a malicious GGUF model file - or receive a crafted JNI call - targeting an Android application compiled against llama.cpp builds b1886 through b7445 with the LLaMA-Android JNI wrapper. The CVSS 4.0 vector specifies AV:L (local attack surface - the malicious file must be on-device and accessible to the application), PR:N (no special privilege level on the Android side is required for exploitation), and UI:P (passive user interaction is required - the user must open or use the app with the malicious model loaded). Exploitation is limited to the Android platform and specifically to applications that have integrated the examples/llama.android binding; the core llama.cpp library on Linux, macOS, or Windows is not confirmed affected by this specific code path. The key limiting factor is the model file delivery: an attacker must convince the user to load a crafted GGUF file, which is plausible in ecosystems where models are routinely downloaded from community repositories but is not a zero-click or network-adjacent attack. |
| Impact | The CVSS 4.0 score of 8.5 with vector AV:L/AC:L/AT:N/PR:N/UI:P reflects a local attack requiring passive user interaction - the user must open or process a malicious GGUF model file - which is a realistic and common action for Android LLM applications where users routinely source models from third parties. The high CIA impact metrics (VC:H/VI:H/VA:H) reflect worst-case RCE within the app process, while SC:N/SI:N/SA:N confirms the scope is contained to the vulnerable application. No EPSS data was provided in the input, so exploitation probability from threat intelligence signals cannot be quantified. The CVE is not listed in CISA KEV, and no POC was referenced, so this should not be treated as actively exploited at time of analysis. Real-world risk is moderate-to-high specifically for Android applications that allow users to load arbitrary GGUF files from untrusted sources; for deployments restricted to vetted, vendor-supplied models, exploitability is substantially reduced. The tags include both DoS and RCE, and reliability of code execution versus crash depends on heap layout - attackers may need additional primitives for reliable RCE beyond the overflow itself. |
| Exploit ScenarioDerived | An attacker crafts a malicious GGUF model file with a deliberately oversized n_seq_max metadata field and distributes it through a third-party model repository, a phishing link, or a compromised model hub. When a user downloads and loads this file into an Android application built on llama.cpp builds b1886-b7445, the new_1batch() function multiplies the oversized n_seq_max by sizeof(llama_seq_id), overflows the integer, and allocates a heap buffer far smaller than required. Subsequent writes into this buffer corrupt adjacent heap metadata, leading to a crash (DoS) or, under controlled heap layout conditions, arbitrary code execution within the app's process - enabling data exfiltration or malware installation on the device. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 06, 2026
Integer overflow in the llama.cpp LLaMA-Android JNI wrapper (builds b1886 through b7445) allows heap corruption through a crafted n_seq_max parameter, enabling denial of service or arbitrary code execution within Android applications that load untrusted GGUF model files. The flaw exists in the new_1batch() function, which multiplies sizeof(llama_seq_id) by an attacker-controlled value without bounds checking, causing heap allocation to wrap and undersize the buffer. No public exploit has been identified at time of analysis and this CVE is not in CISA KEV; a patched release (b7446) is confirmed available from the upstream ggml-org repository.
RemediationAI
Upgrade to llama.cpp build b7446 or later, which is confirmed available at https://github.com/ggml-org/llama.cpp/releases/tag/b7446 and addresses the integer overflow via the upstream commit https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388. As a compensating control prior to patching, restrict Android applications from loading GGUF model files sourced from user-controlled or untrusted locations - this eliminates the primary delivery vector at the cost of reduced user flexibility. Additionally, input validation of the n_seq_max parameter at the JNI boundary before it reaches new_1batch() can prevent the overflow; however, this is a code-level mitigation requiring a custom build. Applications that exclusively load cryptographically signed or vendor-pinned model files from controlled repositories are not practically exploitable via the documented attack path.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-122 (Heap-based Buffer Overflow) describes this class of flaw: the allocation size is computed as sizeof(llama_seq_id) multiplied by the attacker-controlled n_seq_max integer parameter inside new_1batch(), a function in the LLaMA-Android JNI wrapper (examples/llama.android). When n_seq_max is crafted to be sufficiently large, the multiplication overflows the integer type before being passed to the allocator, yielding a heap allocation smaller than the volume of data subsequently written. The result is a classic heap underallocation leading to out-of-bounds writes. The Android JNI layer bridges Java/Kotlin application code to the native llama.cpp C++ library, and this vulnerability exists specifically in that boundary layer. No CPE string was provided; affected artifacts are the llama.cpp project (ggml-org/llama.cpp) builds b1886 through b7445, Android binding component only. The fix commit is at https://github.com/ggml-org/llama.cpp/commit/5c0d18881e0e9794c96b2602736b758bac9d9388 and was released as build b7446.
Know when Llama Cpp gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local attack vector via malicious model file loaded by the user (UI:R); no privileges required on the Android side; full CIA impact within the app process if heap corruption leads to RCE.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
DescriptionCVE.org
llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper where the new_1batch() function multiplies sizeof(llama_seq_id) by an attacker-controlled n_seq_max parameter without overflow validation, causing heap buffer allocation to wrap and allocate insufficient memory. Attackers can exploit this by providing a crafted n_seq_max value through a malicious model file or JNI call to trigger heap corruption and achieve denial of service or arbitrary code execution on Android applications using the LLaMA-Android binding.
Executive ViewAI
An integer overflow vulnerability in llama.cpp's LLaMA-Android JNI wrapper (builds b1886-b7445) enables arbitrary code execution or denial of service when Android applications load untrusted GGUF model files, directly exposing user devices to compromise. Organizations deploying applications built with vulnerable llama.cpp versions face immediate risk of application crashes or remote code execution on end-user devices.
Vendor-released patch: b7446 available from upstream ggml-org repository. Until patching is complete, restrict GGUF model file loading to trusted sources only and consider disabling features that load external models.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Arbitrary memory write in llama.cpp's RPC server allows remote unauthenticated attackers to corrupt arbitrary memory add
Remote code execution in llama.cpp (commit 18c2e17) is possible when a user opens a malicious .gguf model file, triggeri
Llama.cpp server endpoints fail to validate the n_discard parameter from JSON input, allowing negative values that trigg
Remote code execution in llama.cpp (commit 18c2e17) is possible when a victim loads a malicious .gguf model file, trigge
Remote code execution in llama.cpp (GGUF library) allows attackers to achieve arbitrary code execution by tricking a use
Remote code execution in llama.cpp (commit 18c2e17) occurs when the GGUF library's gguf_fread_str function parses a mali
Heap-based buffer overflow in llama.cpp's GGUF library header parser (commit 18c2e17) enables code execution when a vict
CVE-2025-52566 is a signed vs. unsigned integer overflow vulnerability in llama.cpp's tokenizer (llama_vocab::tokenize f
Remote code execution in llama.cpp RPC backend allows unauthenticated attackers with TCP access to achieve arbitrary mem
llama.cpp provides LLM inference in C/C++. Rated medium severity (CVSS 5.3), this vulnerability is remotely exploitable,
Heap buffer overflow in llama.cpp's server KV cache state-restore path (builds b4882 through b9058) lets an attacker who
Stack-based out-of-bounds write in llama.cpp's ggml-rpc RDMA receive path (builds b8841 through b11865) lets unauthentic
EUVD-2026-54276
GHSA-p56f-gv6x-v6mg
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB