Skip to content

CVE-2026-21869 llama.cpp has Out-of-bounds Write in llama-server

CriticalCVSS 9.8 EPSS 0.53%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: total
Technology
UbuntuDebian

Description

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.

Upgrade path

5 packages: 1 fixed, 3 with no fix yet.

PackageAffectedFixed inStatus
ggml llama.cpp All versions No fix listed No fix yet
ubuntu/llama.cpp(Ubuntu 26.04) All versions No fix listed No fix yet
ubuntu/llama.cpp(Ubuntu 26.10) All versions No fix listed No fix yet
debian/llama.cpp(Debian 14) < 7593+dfsg-1; = 5151+dfsg-1~exp2; = 5151+dfsg-1~exp3; = 5318+dfsg-1 +16 more 7593+dfsg-1 Fixed
ggml-org llama.cpp = <= 55d4206c8 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
ggml-org llama.cpp = <= 55d4206c8 No fix listed
debian/llama.cpp(Debian:14) < 7593+dfsg-1 7593+dfsg-1
debian/llama.cpp(Debian:14) = 5151+dfsg-1~exp2 No fix listed
debian/llama.cpp(Debian:14) = 5151+dfsg-1~exp3 No fix listed
debian/llama.cpp(Debian:14) = 5318+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 5318+dfsg-2 No fix listed
debian/llama.cpp(Debian:14) = 5713+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 5760+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 5760+dfsg-2 No fix listed
debian/llama.cpp(Debian:14) = 5760+dfsg-3 No fix listed
debian/llama.cpp(Debian:14) = 5760+dfsg-4 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-2 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-3 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-3~exp1 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-3~exp2 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-3~exp3 No fix listed
debian/llama.cpp(Debian:14) = 5882+dfsg-4 No fix listed
debian/llama.cpp(Debian:14) = 6641+dfsg-1 No fix listed
debian/llama.cpp(Debian:14) = 6641+dfsg-2 No fix listed
debian/llama.cpp(Debian:14) = 6641+dfsg-3 No fix listed
ubuntu/llama.cpp(Ubuntu:26.04) All versions No fix listed
ubuntu/llama.cpp(Ubuntu:26.10) All versions No fix listed
ggml llama.cpp All versions No fix listed

References