cve.bz

CVE-2026-21869 ggml llama.cpp: Out-of-bounds Write

9.8 criticalExploit referenceEPSS 0.5%

Critical (9.8) in ggml llama.cpp. EPSS 0.5% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

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
EPSS
0.5% (unchanged from 0.5% a week ago; 0.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 46th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2026-01-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-787 Out-of-bounds Write
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-21869 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-21869?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-21869?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-21869 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
ggml-org llama.cpp<= 55d4206c8

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian14llama.cpp7593+dfsg-1DEBIAN-CVE-2026-21869
Ubuntu25.10, 26.04:LTS, 26.10llama.cppno fix listedUBUNTU-CVE-2026-21869
openSUSETumbleweedllamacpp9500-1.1openSUSE-SU-2026:10961-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability is rated Important as it allows remote code execution in the llama.cpp server. An unauthenticated remote attacker can trigger out-of-bounds memory writes by providing a negative `n_discard` parameter in JSON input to the server's completion endpoints, leading to a crash or arbitrary code execution. This could impact deployments where the llama.cpp server is exposed to untrusted networks.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-21869.

References

Check your stackJSON