Heap-based Buffer Overflow Affecting llama.cpp package, versions <7593+dfsg-1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.13% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIAN14-LLAMACPP-18582299
  • published7 Aug 2026
  • disclosed6 Aug 2026

Introduced: 6 Aug 2026

NewCVE-2026-70638  (opens in a new tab)
CWE-122  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade Debian:14 llama.cpp to version 7593+dfsg-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream llama.cpp package and not the llama.cpp package as distributed by Debian. See How to fix? for Debian:14 relevant fixed versions and status.

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 Base Scores

version 3.1