| Component | llama.cpp |
| Severity | high (CVSS 7.1) |
| CVSS vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L |
| Published (NVD) | 2024-04-26 |
| Last modified | 2026-06-17 |
| Affected versions | < b2740 read from the advisory text, followed where the structured sources say otherwise |
| Fixed in | b2740 |
| Weakness | CWE-456 |
| CISA KEV | not listed |
Versions, checked against NVD
NVD's analysis reads >= b2715, < b2740. The ranges above are read from the advisory text: neither a GitHub-reviewed advisory nor the CVE record confirms them yet.
NVD description
Llama.cpp is LLM inference in C/C++. There is a use of uninitialized heap variable vulnerability in gguf_init_from_file, the code will free this uninitialized variable later. In a simple POC, it will directly cause a crash. If the file is carefully constructed, it may be possible to control this uninitialized value and cause arbitrary address free problems. This may further lead to be exploited. Causes llama.cpp to crash (DoS) and may even lead to arbitrary code execution (RCE). This vulnerability has been patched in commit b2740.
What to do
- Upgrade llama.cpp to
b2740or later. - Do not expose the component's API or UI to the internet without authentication in front of it.
- Run llama.cpp bound to localhost and reach it over a private network rather than an open port. Tailscale for self-hosted AI · Which machine for a 7B model next to an agent · Agent plus local model, the exact setup, €12