CIOPages

llama.cpp vulnerabilities

CVEs that NVD lists for llama.cpp, newest first. NVD names the product cpe:2.3:a:ggml:llama.cpp; every CVE here lists a version of it as affected. The CISA KEV column marks the ones CISA lists as exploited in the wild.

Source: the National Vulnerability Database CVE API, https://nvd.nist.gov/developers/vulnerabilities, queried by each product’s CPE name, read weekly. CVEs published since November 27, 2023 (the last three years). Checked: November 27, 2026.

Download: CSV, under CC BY 4.0.

Cite as: CIOPages, “Vulnerabilities in AI software,” https://www.ciopages.com/trackers/ai-software-vulnerabilities/product/llama-cpp, from the NVD CVE API, checked November 27, 2026. CC BY 4.0.

CVEDescriptionPublishedCVSSCWECISA KEVChecked
CVE-2026-119052
llama.cpp b2877 before b11935 contains an uncaught exception vulnerability in the ggml-rpc server that allows unauthenticated remote attackers to crash the rpc-server by sending oversized message lengths. After the HELLO handshake, attackers can send a command such as SET_TENSOR…
2026-10-297.5 High
v3.1
CWE-2482026-11-27
CVE-2026-52132
llama.cpp through commit 97f06e9, when started with the --reranking flag, allows remote attackers to cause a denial of service (std::bad_alloc and HTTP 500) via a negative top_n value in a POST request to /rerank.
2026-09-017.5 High
v3.1
CWE-6742026-11-27
CVE-2026-52131
llama.cpp b5693 and before has a Reachable Assertion via the gguf_reader::read function.
2026-09-017.5 High
v3.1
CWE-6172026-11-27
CVE-2026-52130
llama.cpp b5693 and before is vulnerable to Uncontrolled Recursion in common/json-schema-to-grammar.cpp, resulting in a denial of service.
2026-09-017.5 High
v3.1
CWE-6742026-11-27
CVE-2026-70640
llama.cpp builds b1886 through b7445 contain a race condition use-after-free vulnerability in the LLaMA-Android JNI wrapper where bench_1model() and free_1context() lack synchronization, allowing Thread A to operate on freed memory while Thread B concurrently frees the…
2026-08-067.0 High
v3.1
CWE-362, CWE-4762026-11-27
CVE-2026-70639
llama.cpp builds b1886 through b7445 contain a null pointer dereference vulnerability in the LLaMA-Android JNI wrapper where the bench_1model() function fails to validate the model context pointer before dereferencing it. Attackers can supply a malicious, corrupt, or truncated…
2026-08-065.5 Medium
v3.1
CWE-4762026-11-27
CVE-2026-70638
llama.cpp builds b1886 through b7445 contain an integer overflow vulnerability in the LLaMA-Android JNI wrapper where the new_1batch() function multiplies sizeof(llama_seq_id) by an attacker-controlled n_seq_max parameter without overflow validation, causing heap buffer…
2026-08-067.8 High
v3.1
CWE-122, CWE-1902026-11-27
CVE-2026-43632
llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in llama-server affecting six tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens) that bypass the task queue and access…
2026-08-068.1 High
v3.1
CWE-367, CWE-4162026-11-27
CVE-2026-43631
llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in the vocab pointer of llama-server when the --sleep-idle-seconds feature is enabled, allowing unauthenticated remote attackers to execute arbitrary code. Attackers can trigger the…
2026-08-068.1 High
v3.1
CWE-362, CWE-4162026-11-27
CVE-2026-43630
llama.cpp builds b4882 before b8487 contain an out-of-bounds read vulnerability in the recurrent memory state restore path that allows attackers with write access to the slot save directory to read memory past the end of the allocated cells array. Attackers can craft a malicious…
2026-08-066.5 Medium
v3.1
CWE-125, CWE-2092026-11-27
CVE-2026-43629
llama.cpp builds b4882 through b9058 contain a heap buffer overflow vulnerability in the KV cache state restore path where the state_read_data() function computes write size without overflow checking, allowing attackers with write access to the slot_save_path directory to…
2026-08-068.1 High
v3.1
CWE-190, CWE-7872026-11-27
CVE-2026-43628
llama.cpp builds b3978 through b9058 contain an integer underflow and out-of-bounds read vulnerability in the DRY sampler that allows unauthenticated attackers to trigger a heap buffer underflow by sending a crafted HTTP request with dry_allowed_length set to INT32_MIN to the…
2026-08-067.8 High
v3.1
CWE-125, CWE-1912026-11-27
CVE-2026-43627
llama.cpp builds b1283 through b9058 contain an integer overflow vulnerability in the llama_batch_init() function where unchecked multiplications in malloc() calls can wrap past INT32_MAX when computing allocation sizes. Attackers can pass specially crafted parameters to trigger…
2026-08-067.8 High
v3.1
CWE-190, CWE-6802026-11-27
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() while free_1batch() deallocates it using the C++ delete operator, causing heap metadata corruption. Attackers can trigger…
2026-08-067.8 High
v3.1
CWE-415, CWE-7622026-11-27
CVE-2026-34159
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…
2026-04-019.8 Critical
v3.1
CWE-1192026-11-27
CVE-2026-33298
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…
2026-03-247.8 High
v3.1
CWE-122, CWE-1902026-11-27
CVE-2026-27940
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…
2026-03-127.8 High
v3.1
CWE-122, CWE-1902026-11-27
CVE-2026-21869
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…
2026-01-089.8 Critical
v3.1
CWE-7872026-11-27
CVE-2025-52566
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…
2025-06-248.8 High
v3.1
CWE-119, CWE-1952026-11-27
CVE-2025-49847
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…
2025-06-178.8 High
v3.1
CWE-119, CWE-1952026-11-27
CVE-2024-42479
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.
2024-08-129.8 Critical
v3.1
CWE-123, CWE-7872026-11-27
CVE-2024-42478
llama.cpp provides LLM inference in C/C++. The unsafe `data` pointer member in the `rpc_tensor` structure can cause arbitrary address reading. This vulnerability is fixed in b3561.
2024-08-129.8 Critical
v3.1
CWE-1252026-11-27
CVE-2024-42477
llama.cpp provides LLM inference in C/C++. The unsafe `type` member in the `rpc_tensor` structure can cause `global-buffer-overflow`. This vulnerability may lead to memory data leakage. The vulnerability is fixed in b3561.
2024-08-127.5 High
v3.1
CWE-125, CWE-4012026-11-27
CVE-2024-41130
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.
2024-07-226.5 Medium
v3.1
CWE-4762026-11-27
CVE-2024-32878
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…
2024-04-268.8 High
v3.1
CWE-4562026-11-27
CVE-2024-23605
A heap-based buffer overflow vulnerability exists in the GGUF library header.n_kv 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.
2024-02-269.8 Critical
v3.1
CWE-190, CWE-7872026-11-27
CVE-2024-23496
A heap-based buffer overflow vulnerability exists in the GGUF library gguf_fread_str 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.
2024-02-269.8 Critical
v3.1
CWE-190, CWE-7872026-11-27
CVE-2024-21836
A heap-based buffer overflow vulnerability exists in the GGUF library header.n_tensors 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.
2024-02-269.8 Critical
v3.1
CWE-190, CWE-7872026-11-27
CVE-2024-21825
A heap-based buffer overflow vulnerability exists in the GGUF library GGUF_TYPE_ARRAY/GGUF_TYPE_STRING parsing 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…
2024-02-269.8 Critical
v3.1
CWE-190, CWE-7872026-11-27
CVE-2024-21802
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.
2024-02-269.8 Critical
v3.1
CWE-122, CWE-7872026-11-27

More inference servers. All AI software.

This product uses the NVD API but is not endorsed or certified by the NVD. CVE links open the National Vulnerability Database. Descriptions are the CNA’s text as NVD publishes it, shortened here to 280 characters; the CSV has it in full. CVSS is the base score NVD lists for one CVE, version 3.1 where given, else 4.0, else 3.0: it is not a rating of a product or its vendor. Rows are ordered by the date NVD published them. The CISA KEV column comes from the CISA Known Exploited Vulnerabilities catalog, checked November 27, 2026. Change log.

Keep reading

Buyer Guide
AI Model Serving & Inference Platforms
Checklist
Third-Party Risk Management Checklist

Assess and monitor vendor security and compliance risks.

State of Play
Zero trust network access

The annual review of this market: what changed, with answers from the vendors in it.

BentoML vulnerabilities