Impact
The vulnerability is an unchecked integer multiplication in the llama_batch_init() function of ggml‑org llama.cpp (versions b1283 through b9058). During allocation size calculations, the product can overflow INT32_MAX, causing heap corruption. An attacker who can supply crafted batch parameters may trigger the overflow and subsequently write beyond the allocated buffer, potentially achieving arbitrary code execution. This flaw is identified as CWE‑190 (Integer Overflow or Wraparound) and CWE‑680 (Integer Overflow to Buffer Overflow).
Affected Systems
Affected systems are ggml‑org llama.cpp versions b1283 to b9058. The patched source code is available at https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches. Users running any of these builds should upgrade immediately.
Risk and Exploitability
The CVSS base score is 8.5, indicating high severity. No EPSS score is available, so the exploitation probability is unknown, and the vulnerability is not listed in CISA KEV. Attackers can trigger the overflow by submitting specially crafted batch parameters, suggesting the attack vector depends on whether batch operations are exposed over the network or to local users. If batch processing is exposed, the flaw could be exploited remotely. If only local, the risk remains significant. Immediate patching is recommended due to the high severity score.
OpenCVE Enrichment