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.
Metrics
Affected Vendors & Products
References
History
Thu, 08 Jan 2026 20:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
Thu, 08 Jan 2026 12:30:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| References |
| |
| Metrics |
threat_severity
|
threat_severity
|
Thu, 08 Jan 2026 10:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Ggml
Ggml llama.cpp |
|
| Vendors & Products |
Ggml
Ggml llama.cpp |
Wed, 07 Jan 2026 23:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | llama.cpp has Out-of-bounds Write in llama-server | |
| Weaknesses | CWE-787 | |
| References |
| |
| Metrics |
cvssV3_1
|
Status: PUBLISHED
Assigner: GitHub_M
Published:
Updated: 2026-01-08T19:15:28.709Z
Reserved: 2026-01-05T16:44:16.368Z
Link: CVE-2026-21869
Updated: 2026-01-08T19:15:19.593Z
Status : Awaiting Analysis
Published: 2026-01-08T00:16:00.297
Modified: 2026-01-08T20:15:45.663
Link: CVE-2026-21869
OpenCVE Enrichment
Updated: 2026-01-08T09:47:51Z