Integer Overflow Vulnerability in LLaMA-Android JNI Wrapper from GGML
CVE-2026-70638

8.5HIGH

Key Information:

Vendor

Ggml-org

Status
Vendor
CVE Published:
6 August 2026

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

Score:
8.5
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

Credit

Vladimir Tokarev (@G1ND1L4) - Vulnerability Research Tech Lead, Cyera
Ofek Itach (@ofekitach) - Security Research Team Lead, Cyera
.