Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-70638— llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp

Quick assessment

Affected
ggml-org llama.cpp
Exploitation
Public or AI PoC available; prioritize validation
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

ggml llama.cpp是ggml组织的一个在本地执行大语言模型推理的引擎。 ggml llama.cpp b1886至b7445版本存在安全漏洞,该漏洞源于LLaMA-Android JNI封装中的new_1batch()函数在未进行溢出验证的情况下,将sizeof(llama_seq_id)与攻击者控制的n_seq_max参数相乘,导致堆缓冲区分配回绕并分配不足内存,攻击者可通过恶意模型文件或JNI调用提供特制的n_seq_max值,触发堆破坏,导致拒绝服务或任意代码执行。

CVSS 7.8 · High EPSS 0.23% · P13

Affected Version Matrix 3

VendorProduct Version RangeStatus
ggml-org llama.cpp b1886≤ b7445 affected
0.9.0≤ 0.17.1 affected
5c0d18881e0e9794c96b2602736b758bac9d9388 unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-70638

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
llama.cpp b1886–b7445 Integer Overflow via new_1batch() in llama-android.cpp
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
整数溢出或超界折返
Source: CVE Program / CVE List V5
Vulnerability Title
ggml llama.cpp 缓冲区错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
ggml llama.cpp是ggml组织的一个在本地执行大语言模型推理的引擎。 ggml llama.cpp b1886至b7445版本存在安全漏洞,该漏洞源于LLaMA-Android JNI封装中的new_1batch()函数在未进行溢出验证的情况下,将sizeof(llama_seq_id)与攻击者控制的n_seq_max参数相乘,导致堆缓冲区分配回绕并分配不足内存,攻击者可通过恶意模型文件或JNI调用提供特制的n_seq_max值,触发堆破坏,导致拒绝服务或任意代码执行。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
ggml-org llama.cpp b1886 ~ b7445 -

II. Public POCs for CVE-2026-70638

# POC Description Source Link Shenlong Link
AI-Generated POC Premium
Qwen3.6-35B-A3B · 12031 chars
Pro+ exclusive includes:
Vulnerability reproduction recording (real sandbox build + trigger, exclusive)
In-depth vulnerability mechanism
Trigger conditions & impact
Full executable POC code
Exploit chain & mitigation
POC zip download
100+ AI POC generations per month

III. Intelligence Information for CVE-2026-70638

请登录查看更多情报信息。

Patches & Fixes for CVE-2026-70638 (1)

Vendor Advisories for CVE-2026-70638 (1)

Vendor Pages for CVE-2026-70638 (1)

Same Patch Batch · ggml-org · 2026-08-06 · 10 CVEs total

CVE-2026-43632 8.1 HIGH llama.cpp b7492–b9060 Use-After-Free in Tokenization Endpoints
CVE-2026-43631 8.1 HIGH llama.cpp b7492–b9060 Use-After-Free RCE via llama-server
CVE-2026-43629 8.1 HIGH llama.cpp b4882–b9058 Buffer Overflow in KV Cache State Restore
CVE-2026-43622 7.8 HIGH llama.cpp b1886–b7445 Double Free via llama-android.cpp
CVE-2026-43627 7.8 HIGH llama.cpp b1283–b9058 Integer Overflow in llama_batch_init() Function
CVE-2026-43628 7.8 HIGH llama.cpp b3978–b9058 Integer Underflow via DRY Sampler
CVE-2026-70640 7.0 HIGH llama.cpp b1886–b7445 Race Condition Use-After-Free via llama-android.cpp
CVE-2026-43630 6.5 MEDIUM llama.cpp b5702–b7653 Out-of-Bounds Read Information Disclosure
CVE-2026-70639 5.5 MEDIUM llama.cpp b1886–b7445 Null Pointer Dereference DoS via llama-android.cpp

IV. Related Vulnerabilities

V. Comments for CVE-2026-70638

No comments yet


Leave a comment