| Component | llama.cpp |
| Severity | high (CVSS 7.8) |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| Published (NVD) | 2026-03-24 |
| Last modified | 2026-06-17 |
| Affected versions | llama.cpp < b7824 |
| Fixed in | b7824 |
| Weakness | CWE-122CWE-190 |
| CISA KEV | not listed |
NVD 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.
What to do
- Upgrade llama.cpp to
b7824or later. - Do not expose the component's API or UI to the internet without authentication in front of it.
Sources
- NVD: CVE-2026-33298
- https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-96jg-mvhq-q7q7
- https://github.com/ggml-org/llama.cpp/releases/tag/b7824
Other llama.cpp CVEs
llama.cpp before b11393 contains a use-after-free and double free vulnerability in common_chat_peg_mapper::map that allows unauthenticated r...
A vulnerability was detected in ggml-org llama.cpp up to 0.4.0. This impacts the function rpc_server::deserialize_tensor of the file ggml/sr...
llama.cpp through commit 97f06e9, when started with the --reranking flag, allows remote attackers to cause a denial of service (std::bad_all...
llama.cpp b5693 and before has a Reachable Assertion via the gguf_reader::read function.
llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.
A vulnerability was determined in ggml-org llama.cpp bec4772f6. This affects the function rpc_server::graph_compute of the file ggml/src/ggm...