Description

llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger integer overflow, causing heap corruption and potentially achieving arbitrary code execution through subsequent batch operations that write past allocated buffer boundaries.

Severity (CVSS)

Base score8.5
SeverityHigh
VersionCVSS 4.0
VectorCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Provided byCNA

Weaknesses

  • CWE-190 — CWE-190 Integer Overflow or Wraparound
  • CWE-680 — CWE-680 Integer Overflow to Buffer Overflow

Affected products

VendorProductVersions
ggml-orgllama.cppb1283 to <=b9058; 0.4.0 to <=0.17.1

References

Authoritative sources

This page is a snapshot. For the latest enrichment and updates, view the record on CVE.org or the NVD.

Generated from the official CVE List on 07 Aug 2026 07:02 UTC.