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

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.53%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-01-07T23:37:59.886Z
- Modified: 2026-06-17T10:19:03.657Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- ggml-org llama.cpp: <= 55d4206c8
- ggml llama.cpp: no versions given

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/ggml-org/llama.cpp/security/advisories/GHSA-8947-pfff-2f3c> (exploit, vendor-advisory)

## Sources

- CVE List: [CVE-2026-21869](https://www.cve.org/CVERecord?id=CVE-2026-21869), CVE Terms of Use, modified 2026-01-08
- NVD: [CVE-2026-21869](https://nvd.nist.gov/vuln/detail/CVE-2026-21869), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-21869 · Whole record: https://cve.day/CVE-2026-21869.json · Rebuilt by cve.day 2026-11-25T22:59:12.652Z
