CVE-2026-33298
JSON

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 packageVersionsReported by
ggml-org llama.cpp< b7824CVE List
ggml llama.cppbefore b7824NVD

Classification

CWE-122CWE-190

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

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

Sources

SourceRecordLicence
CVE ListCVE-2026-33298 changed 2026-03-25CVE Terms of Use
NVDCVE-2026-33298 changed 2026-06-17Public domain