7.8high
llama.cpp has a Heap Buffer Overflow via Integer Overflow in GGUF Tensor Parsing
- Severity
- 7.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
Description
llama.cpp is an inference of several LLM models in C/C++. Prior to b7824, an integer overflow vulnerability in the `ggml_nbytes` function allows an attacker to bypass memory validation by crafting a GGUF file with specific tensor dimensions. This causes `ggml_nbytes` to return a significantly smaller size than required (e.g., 4MB instead of Exabytes), leading to a heap-based buffer overflow when the application subsequently processes the tensor. This vulnerability allows potential Remote Code Execution (RCE) via memory corruption. b7824 contains a fix.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ggml-org llama.cpp | < b7824 | CVE List |
| ggml llama.cpp | before b7824 | NVD |
Classification
What each source says
CVE List
llama.cpp is an inference of several LLM models in C/C++. Prior to b7824, an integer overflow vulnerability in the `ggml_nbytes` function allows an attacker to bypass memory validation by crafting a GGUF file with specific tensor dimensions. This causes `ggml_nbytes` to return a significantly smaller size than required (e.g., 4MB instead of Exabytes), leading to a heap-based buffer overflow when the application subsequently processes the tensor. This vulnerability allows potential Remote Code Execution (RCE) via memory corruption. b7824 contains a fix.
NVD (es)
llama.cpp es una inferencia de varios modelos LLM en C/C++. Antes de b7824, una vulnerabilidad de desbordamiento de entero en la función `ggml_nbytes` permite a un atacante eludir la validación de memoria al crear un archivo GGUF con dimensiones de tensor específicas. Esto hace que `ggml_nbytes` devuelva un tamaño significativamente menor al requerido (por ejemplo, 4MB en lugar de Exabytes), lo que lleva a un desbordamiento de búfer basado en montículo cuando la aplicación procesa posteriormente el tensor. Esta vulnerabilidad permite una posible ejecución remota de código (RCE) a través de corrupción de memoria. b7824 contiene una corrección.
References
| https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-96jg-mvhq-q7q7 | exploit, vendor-advisory | |
| https://github.com/ggml-org/llama.cpp/releases/tag/b7824 | release-notes | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33298 changed 2026-03-25 | CVE Terms of Use |
| NVD | CVE-2026-33298 changed 2026-06-17 | Public domain |