LiveActive security incident?Get immediate response
CVE Record

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

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.

HighCVSS 8.8Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2026-21869 affects llama.cpp’s llama-server completion endpoints. A crafted request can trigger memory corruption when the model context fills, potentially crashing the service or enabling remote code execution. The published advisory states there was no fix at publication, so exposed llama-server deployments should be treated as urgent risk.

Executive priority

Prioritize this for exposed AI inference services. The combination of possible remote code execution, crash impact, and no fix at publication makes containment and exposure reduction important until vendor guidance changes.

Technical view

In ggml-org llama.cpp commit 55d4206c8 and earlier, llama-server parses n_discard from JSON without validating it is non-negative. A negative value can cause reversed ranges and negative offsets in llama_memory_seq_rm/add during token evaluation, producing out-of-bounds writes. The issue is classified as CWE-787 with CVSS 8.8 high severity.

Likely exposure

Organizations running llama.cpp llama-server at commit 55d4206c8 or earlier are potentially exposed, especially if completion endpoints are reachable by untrusted users or networks. The source bundle does not identify specific packaged distributions, hosted services, or downstream products.

Exploitation context

The advisory describes network attack vector, low complexity, no privileges, and user interaction required by CVSS. It states deterministic memory corruption may crash the process or enable RCE. The provided sources do not report active exploitation, and this CVE is not marked KEV.

Researcher notes

Evidence is limited to the CVE record and GitHub advisory. Do not assume exploit availability or affected downstream products without additional confirmation. Focus validation on version lineage, endpoint exposure, and whether untrusted users can submit completion requests.

Mitigation direction

  • Check the GitHub advisory and project releases for vendor guidance or a fix.
  • Restrict llama-server completion endpoints to trusted networks and authenticated users.
  • Remove public internet exposure until a validated fix or mitigation is available.
  • Consider pausing affected llama-server workloads where exposure cannot be controlled.
  • Monitor llama-server crashes or abnormal restarts as possible indicators.

Validation and detection

  • Inventory llama.cpp deployments and identify any running llama-server components.
  • Confirm whether deployed code is commit 55d4206c8 or earlier.
  • Map which completion endpoints are reachable from untrusted networks or users.
  • Review access controls in front of llama-server endpoints.
  • Track the advisory for updates on fixed commits or supported remediation.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-787: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
description · low confidence lookup

Credential and access behavior lookup

The CVE wording references authentication or credential exposure, so valid-account and credential-access review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-21869 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.8CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H2.85.9Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.8High
CVSS 3.1 vector shape for CVE-2026-21869Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
ggml-orgllama.cpp<= 55d4206c8Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-787 · source CWE mapping

Out-of-bounds Write

Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.