SA-26-483 High

llama.cpp: Llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the…

llama.cpp

Severity
High, CVSS 7.8
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Record
CVE-2026-70638
Affects
llama.cpp
Known exploited
Not listed in the CISA Known Exploited Vulnerabilities catalog
Published
Record first published by the source
August 6, 2026
Source last modified
October 24, 2026

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.

Description quoted from the NVD record.

Who is affected

This problem affects llama.cpp, made by ggml, which is software for running AI language models on your own computers and devices. The flaw is in the LLaMA-Android add-on, which lets Android phone and tablet apps use llama.cpp, in builds b1886 through b7445. Only Android apps that include this add-on are affected. An attacker who gets such an app to load a specially crafted AI model file, or who feeds it a crafted setting value, could make the app set aside too little memory. This could crash the app or let the attacker run their own code on the device. This flaw is rated High.

What to do

  1. The person who builds or installs your organization's Android apps that use llama.cpp should handle this, along with any outside developer or IT provider who makes or manages those apps for you.
  2. Check whether any of those apps include the LLaMA-Android add-on from llama.cpp builds b1886 through b7445.
  3. No fixed version is named for this flaw yet, so check the vendor advisory linked on this page for a fixed release and update the affected apps once one is available.
  4. If an IT provider or app developer runs these apps for your organization, send them this advisory and ask when the update will be done.

Analysis written from the source record as of October 24, 2026 and reviewed before publishing.

Sources

MORE ADVISORIES

See all