Integer Overflow Vulnerability in LLaMA-Android JNI Wrapper from GGML
CVE-2026-70638
What is CVE-2026-70638?
The LLaMA-Android JNI wrapper in the llama.cpp builds from b1886 to b7445 has an integer overflow vulnerability. This flaw occurs in the new_1batch() function, where the multiplication of sizeof(llama_seq_id) with the unvalidated attacker-controlled parameter n_seq_max can lead to insufficient heap memory allocation. An attacker can exploit this vulnerability by injecting a crafted n_seq_max value through a malicious model file or JNI call, resulting in heap corruption. This exploitation may enable a denial of service or even arbitrary code execution on Android applications leveraging the LLaMA-Android library.
Affected Version(s)
llama.cpp b1886
llama.cpp 0.9.0 <= 0.17.1
llama.cpp 5c0d18881e0e9794c96b2602736b758bac9d9388
References
CVSS V4
Timeline
Vulnerability published
Vulnerability Reserved
