CVE-2026-21869
JSON

8.8high

llama.cpp has Out-of-bounds Write in llama-server

Severity
8.8high CVSS:3.1 by GitHub_M
Exploit likelihood
0.53% (higher than 46% of CVEs; EPSS, by FIRST)
Published
Last changed
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.

Affected

Product or packageVersionsReported by
ggml-org llama.cpp<= 55d4206c8CVE List
ggml llama.cppNot specifiedNVD

All scores

GitHub_M8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-787

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

llama.cpp es una inferencia de varios modelos LLM en C/C++. En los commits 55d4206c8 y anteriores, el parámetro n_discard se analiza directamente de la entrada JSON en los puntos finales de completado del servidor de llama.cpp sin validación para asegurar que no sea negativo. Cuando se suministra un valor negativo y el contexto se llena, llama_memory_seq_rm/add recibe un rango invertido y un desplazamiento negativo, causando escrituras de memoria fuera de límites en el bucle de evaluación de tokens. Esta corrupción de memoria determinista puede bloquear el proceso o permitir la ejecución remota de código (RCE). No hay una solución en el momento de la publicación.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-21869 changed 2026-01-08CVE Terms of Use
NVDCVE-2026-21869 changed 2026-06-17Public domain