Vulnerabilities
20 CVEs · NVD, GitHub Advisories, CISA KEV, FIRST EPSS, GitHub PoC repos
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2026-52132 | Unauthenticated DoS in llama.cpp /rerank endpoint via negative top_n llama.cpp builds through commit 97f06e9 fail to handle a negative top_n value in POST requests to the /rerank endpoint, producing an out-of-memory condition (std::bad_alloc, classified as uncontrolled recursion per CWE-674) that is surfaced as an HTTP 500 error. The flaw is triggered remotely and without authentication whenever a server process is started with the --reranking flag and accepts requests at /rerank. An attacker who can reach the endpoint can disrupt availability, either crashing the process or making rerank requests fail, with no confidentiality or integrity impact (CVSS 3.1: AV:N/AC:L/PR:N/UI:N, A:H). Only deployments running the llama.cpp HTTP server with reranking enabled are affected; instances run without the --reranking flag, or whose /rerank endpoint is not reachable by untrusted clients, are not exposed. No public proof of concept exists, it is not in CISA's KEV catalog, and EPSS estimates a 0.3% probability of exploitation within 30 days, so no in-the-wild exploitation is currently known. Do: Upgrade to a llama.cpp build newer than commit 97f06e9 once a patched release is available, since the advisory does not name a fixed version. As interim mitigations, avoid starting the server with --reranking unless reranking is required, restrict /rerank to trusted clients or place authentication in front of it, and reject requests with a negative top_n at a reverse proxy. Monitor /rerank for HTTP 500 responses as a possible sign of probing. | 7.5 | <1% |
| nichelikely hundreds to low thousands of affected deployments at most (estimate; llama.cpp has very broad self-hosted adoption, but only instances running the HTTP… | ||
| CVE-2026-43622 | llama.cpp builds b1886 through b7445 contain a double free vulnerability in the LLaMA-Android JNI wrapper where new_1batch() allocates memory using malloc() whi llama.cpp builds b1886 through b7445 contain a double free vulnerability in the LLaMA-Android JNI wrapper where new_1batch() allocates memory using malloc() while free_1batch() deallocates it using the C++ delete operator, causing heap metadata corruption. Attackers can trigger this memory management mismatch to cause denial of service through process crashes or potentially achieve arbitrary code execution depending on allocator state. NVD description · AI analysis pending | 8.5 | <1% |
| — | ||
| CVE-2026-34159 | llama.cpp is an inference of several LLM models in C/C++. llama.cpp is an inference of several LLM models in C/C++. Prior to version b8492, the RPC backend's deserialize_tensor() skips all bounds validation when a tensor's buffer field is 0. An unauthenticated attacker can read and write arbitrary process memory via crafted GRAPH_COMPUTE messages. Combined with pointer leaks from ALLOC_BUFFER/BUFFER_GET_BASE, this gives full ASLR bypass and remote code execution. No authentication required, just TCP access to the RPC server port. This issue has been patched in version b8492. NVD description · AI analysis pending | 9.8 | 1% | PoC |
| — | |
| CVE-2026-33298 | llama.cpp is an inference of several LLM models in C/C++. 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 description · AI analysis pending | 7.8 | <1% | PoC |
| — | |
| CVE-2026-27940 | llama.cpp is an inference of several LLM models in C/C++. llama.cpp is an inference of several LLM models in C/C++. Prior to b8146, the gguf_init_from_file_impl() in gguf.cpp is vulnerable to an Integer overflow, leading to an undersized heap allocation. Using the subsequent fread() writes 528+ bytes of attacker-controlled data past the buffer boundary. This is a bypass of a similar bug in the same file - CVE-2025-53630, but the fix overlooked some areas. This vulnerability is fixed in b8146. NVD description · AI analysis pending | 7.8 | <1% | PoC |
| — | |
| CVE-2026-21869 | llama.cpp is an inference of several LLM models in C/C++. llama.cpp is an inference of several LLM models in C/C++. In commits 55d4206c8 and prior, the n_discard parameter is parsed directly from JSON input in the llama.cpp server's completion endpoints without validation to ensure it's non-negative. When a negative value is supplied and the context fills up, llama_memory_seq_rm/add receives a reversed range and negative offset, causing out-of-bounds memory writes in the token evaluation loop. This deterministic memory corruption can crash the process or enable remote code execution (RCE). There is no fix at the time of publication. NVD description · AI analysis pending | 9.8 | <1% | PoC |
| — | |
| CVE-2025-52566 | llama.cpp is an inference of several LLM models in C/C++. llama.cpp is an inference of several LLM models in C/C++. Prior to version b5721, there is a signed vs. unsigned integer overflow in llama.cpp's tokenizer implementation (llama_vocab::tokenize) (src/llama-vocab.cpp:3036) resulting in unintended behavior in tokens copying size comparison. Allowing heap-overflowing llama.cpp inferencing engine with carefully manipulated text input during tokenization process. This issue has been patched in version b5721. NVD description · AI analysis pending | 8.8 | <1% | PoC |
| — | |
| CVE-2025-49847 | llama.cpp is an inference of several LLM models in C/C++. llama.cpp is an inference of several LLM models in C/C++. Prior to version b5662, an attacker‐supplied GGUF model vocabulary can trigger a buffer overflow in llama.cpp’s vocabulary‐loading code. Specifically, the helper _try_copy in llama.cpp/src/vocab.cpp: llama_vocab::impl::token_to_piece() casts a very large size_t token length into an int32_t, causing the length check (if (length < (int32_t)size)) to be bypassed. As a result, memcpy is still called with that oversized size, letting a malicious model overwrite memory beyond the intended buffer. This can lead to arbitrary memory corruption and potential code execution. This issue has been patched in version b5662. NVD description · AI analysis pending | 8.8 | <1% |
| — | ||
| CVE-2024-42479 | llama.cpp provides LLM inference in C/C++. llama.cpp provides LLM inference in C/C++. The unsafe `data` pointer member in the `rpc_tensor` structure can cause arbitrary address writing. This vulnerability is fixed in b3561. NVD description · AI analysis pending | 9.8 group max | 3% | PoC |
| — | |
| CVE-2024-41130 | llama.cpp provides LLM inference in C/C++. llama.cpp provides LLM inference in C/C++. Prior to b3427, llama.cpp contains a null pointer dereference in gguf_init_from_file. This vulnerability is fixed in b3427. NVD description · AI analysis pending | 6.5 | <1% |
| — | ||
| CVE-2024-32878 | Llama.cpp is LLM inference in C/C++. 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. NVD description · AI analysis pending | 8.8 | <1% |
| — | ||
| CVE-2024-21802 | A heap-based buffer overflow vulnerability exists in the GGUF library info->ne functionality of llama.cpp Commit 18c2e17. A heap-based buffer overflow vulnerability exists in the GGUF library info->ne functionality of llama.cpp Commit 18c2e17. A specially crafted .gguf file can lead to code execution. An attacker can provide a malicious file to trigger this vulnerability. NVD description · AI analysis pending | 9.8 | 1% | PoC ×2 |
| — |