CVE-2026-21869 json
llama.cpp has Out-of-bounds Write in llama-server
published 2026-01-07 10 mo ago modified 2026-06-17 4 mo ago also EUVD-2026-1661
- cvss
- 8.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.5%
- EPSS 0.5% chance of exploitation in 30 days, percentile 44%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- llama.cpp Debian 14 7593+dfsg-1
debian advisories DEBIAN-CVE-2026-21869
- llamacpp openSUSE Tumbleweed 9500-1.1
opensuse advisories openSUSE-SU-2026:10961-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-21869 updated cvss 8.1
llama.cpp: llama.cpp: Remote code execution via invalid n_discard parameter in server endpoints
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 10 mo ago
Exploit prediction
0.53% chance of exploitation in the next 30 days, higher than 44% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8947-pfff-2f3c referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected products
- ggml-org llama.cpp
Classification
- Weakness
-
- CWE-787 Out-of-bounds Write
References
-
github.com
/ggml-org/llama.cpp/security/advisories/GHSA-8947-pfff-2f3c
exploit, vendor-advisory
Sources
- CVE List CVE-2026-21869
- NVD CVE-2026-21869
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.