CVE-2026-70638

llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp

HIGH
7.8
CVSS Score
Published: August 6, 2026 at 03:35 PM UTC
Updated: October 24, 2026 at 03:10 PM UTC
2 products affected across 2 vendorsLlama.cppLlama.cpp

Using llama.cpp by ggml-org?

Get instant alerts when new vulnerabilities affect llama.cpp - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

b1886 ≤ v ≤ b7445
0.9.0 ≤ v ≤ 0.17.1b1886 ≤ v ≤ b74450.9.0b1886
Vendor states this is fixed in 5c0d18881e0e9794c96b2602736b758bac9d9388 (unaffected)

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHVulnCheck
Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-122CWE-190

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card