CVE-2026-21869 llama.cpp has Out-of-bounds Write in llama-server
- 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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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
| Product | Affected versions | Fixed 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
- https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8947-pfff-2f3c exploit vendor-advisory
- Debian Security Tracker CVE-2026-21869 vendor-advisory
- Red Hat CVE page vendor-advisory
- Red Hat Bugzilla 2427743 issue-tracking
- www.cve.org
- nvd.nist.gov
- Ubuntu CVE tracker vendor-advisory
- bugs.debian.org issue-tracking