Skip to main content
EPSS 0.2%top 89%

CVE-2026-70638: Integer Overflow or Wraparound in ggml-org llama.cpp

0
High
Published: 08/06/2026 (08/06/2026, 15:35:08 UTC)
Source: CVE Database V5
Vendor/Project: ggml-org
Product: llama.cpp

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.

CVSS v4.0

Score 8.5high

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

ggml-org

llama.cpp

Affected versions
>=b1886 <=b7445>=0.9.0 <=0.17.1
GitHub Actionsmore threats →ai
ggml-org/llama.cpp
pkg:github/ggml-org/llama.cpp
Affected versions
=0.9.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/14/2026, 15:54:58 UTC

Technical Analysis

llama.cpp versions b1886 through 0.9.0 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper. Specifically, the new_1batch() function multiplies sizeof(llama_seq_id) by the n_seq_max parameter, which is attacker-controlled, without checking for overflow. This results in a heap buffer allocation wraparound, causing insufficient memory allocation. An attacker can exploit this by supplying a crafted n_seq_max value via a malicious model file or JNI call, triggering heap corruption that may lead to denial of service or arbitrary code execution on affected Android applications.

Potential Impact

Exploitation of this vulnerability can cause heap corruption due to insufficient memory allocation, potentially resulting in denial of service or arbitrary code execution on Android applications using the vulnerable LLaMA-Android JNI wrapper. No known exploits in the wild have been reported.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a patch is available, avoid processing untrusted model files or JNI calls that could supply malicious n_seq_max values to the LLaMA-Android binding.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
VulnCheck
Date Reserved
2026-08-04T20:17:18.298Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a75070dbf8831d5395f5c71

Added to database: 08/06/2026, 22:13:33 UTC

Last enriched: 08/14/2026, 15:54:58 UTC

Last updated: 09/21/2026, 22:01:37 UTC

Views: 40

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses