Skip to main content

llama.cpp EUVDEUVD-2026-54285

| CVE-2026-43630 MEDIUM
Out-of-bounds Read (CWE-125)
2026-08-06 disclosure@vulncheck.com GHSA-27j8-r4f8-8v3x
6.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain write access to slot save directory
  2. Delivery
    Craft slot file with oversized seq_id
  3. Exploit
    Trigger server slot state restore
  4. Execution
    OOB heap read leaks pointer values into logs
  5. Persist
    Extract ASLR-defeating pointer data from logs
  6. Impact
    Chain follow-on memory corruption exploit

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the attacker to hold write access to the llama.cpp slot save directory - the specific prerequisite captured by AT:P in the CVSS 4.0 vector. The slot save/restore feature must be active, as the vulnerable code path (state_read_meta) is only executed when the server restores previously saved recurrent model state. The timing is also constrained: the malicious slot file must be in place before a state restore operation is triggered. Exploitation is further limited by: (1) the write-access precondition, which rules out unauthenticated remote attackers in correctly hardened deployments where the slot directory is owned exclusively by the service account; (2) the exfiltration channel being server logs, which the attacker must also be able to read to extract useful pointer data; and (3) the impact being a confidentiality/ASLR-defeat primitive with no direct code execution - a follow-on attack step is required to realize full exploitation.

Impact

The CVSS 4.0 score of 6.3 (Medium) is broadly consistent with the realistic threat profile. The AT:P metric correctly captures the critical precondition: write access to the slot save directory. In correctly hardened production deployments where the slot directory is owned exclusively by the llama.cpp process account, this precondition materially limits the attack surface to already-compromised users, shared-hosting scenarios, or misconfigured installations. The provided CVSS 4.0 vector uses PR:N, which is in tension with the description's explicit requirement for directory write access; this analyst assesses PR:L as more accurate. The primary real-world risk is as an ASLR-defeat primitive in a multi-stage attack chain rather than a standalone critical flaw: the OOB read yields confidentiality impact only (VC:L), with no direct code execution capability. No EPSS score was provided in the source data, but the precondition requirement makes autonomous or mass scanning exploitation highly unlikely. The VA:L impact in the CVSS 4.0 vector likely reflects potential server instability from reads into unmapped or sensitive heap regions. No KEV listing and no public exploit code were identified, further supporting a medium-priority classification outside of environments with already-weak directory permission controls.

Exploit ScenarioDerived

An attacker who has obtained write access to the llama.cpp slot save directory - for example, through a misconfigured shared directory, a co-tenant in a multi-user environment, or a separate vulnerability granting file write - places a crafted slot file containing an oversized seq_id value before a slot restore operation occurs. When the server reads the slot file and processes the unchecked seq_id, it reads memory past the end of the cells array, and the leaked heap contents including pointer values are emitted into server logs. The attacker, who also has log read access, extracts these pointer values to defeat ASLR and uses them to construct a more precise memory corruption exploit targeting the llama.cpp server process.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 06, 2026

Out-of-bounds heap read in llama.cpp's recurrent memory state restore path (builds b5702 through b7653) allows an attacker with write access to the slot save directory to craft a malicious slot file that triggers heap data leakage - including pointer values - into server logs, effectively defeating ASLR protections and enabling multi-stage exploitation. No public exploit has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalogue. An upstream fix is available as a commit to the ggml-org/llama.cpp repository, though a tagged released version past the affected build range has not been independently confirmed.

RemediationAI

The upstream fix is available as commit f93c09e2673090b59802f2552848a1cac70598b0 in the ggml-org/llama.cpp repository (https://github.com/ggml-org/llama.cpp/commit/f93c09e2673090b59802f2552848a1cac70598b0); users should build from this commit or any subsequent build past b7653 that incorporates it. A tagged released patched version has not been independently confirmed - the fix exists at commit level only, so users should monitor the repository for a confirmed tagged release. As a compensating control, restrict write permissions on the slot save directory strictly to the llama.cpp server process account using OS-level permissions (e.g., chmod 700 and chown to the service user), which prevents untrusted parties from placing crafted slot files and is the most effective mitigation short of patching. If slot save and restore functionality is not required, disabling it entirely eliminates the vulnerable code path with no functional trade-off for deployments that do not use session persistence. Additional security patches are referenced at https://github.com/Vladimir-tokarev-cyera/llama-cpp-security-patches.

Affected VersionsENISA

llama.cpp b5702 ≤b7653
llama.cpp 0.17.1

Affected Packages

euvd llama_cpp no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

llama.cpp is an open-source C/C++ inference engine for large language models widely used both locally and in server deployments. The vulnerability (CWE-125: Out-of-bounds Read) resides in src/llama-memory-recurrent.cpp within the state_read_meta function, which handles restoring recurrent model memory state from disk-persisted slot files. When the server reads a seq_id field from a slot file, the original code validated only that seq_id >= 0, omitting the critical upper-bound check (seq_id < n_seq_max). An oversized seq_id causes array indexing past the end of the allocated cells array in heap memory. The commit diff at f93c09e2673090b59802f2552848a1cac70598b0 confirms the fix: adding (uint32_t) seq_id >= this->n_seq_max restores the bounds check that was apparently commented out as a TODO. No CPE string was provided in the source data; affected versions are identified by EUVD-2026-54285 as build range b5702-b7653 and release 0.17.1.

Know when Llama Cpp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (vulncheck) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 4.2 MEDIUM

Write access to the slot save directory constitutes low privilege (PR:L) and a specific precondition (AC:H); impact limited to partial heap disclosure (C:L) and potential server instability (A:L).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 6.5 MEDIUM

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

llama.cpp builds b5702 through b7653 contain an out-of-bounds read vulnerability in the recurrent memory state restore path that allows attackers with write access to the slot save directory to read memory past the end of the allocated cells array. Attackers can craft a malicious slot file with an oversized seq_id value to trigger an out-of-bounds read that leaks heap data including pointer values into server logs, defeating ASLR protections and facilitating further exploitation.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Medium
popular open-source LLM inference engine, widely adopted by developers and researchers
Data Quality
9 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2024-42479 CRITICAL POC
10.0 Aug 12

Arbitrary memory write in llama.cpp's RPC server allows remote unauthenticated attackers to corrupt arbitrary memory add

CVE-2024-21802 HIGH POC
8.8 Feb 26

Remote code execution in llama.cpp (commit 18c2e17) is possible when a user opens a malicious .gguf model file, triggeri

CVE-2026-21869 HIGH POC
8.8 Jan 08

Llama.cpp server endpoints fail to validate the n_discard parameter from JSON input, allowing negative values that trigg

CVE-2024-21825 HIGH POC
8.8 Feb 26

Remote code execution in llama.cpp (commit 18c2e17) is possible when a victim loads a malicious .gguf model file, trigge

CVE-2024-23605 HIGH POC
8.8 Feb 26

Remote code execution in llama.cpp (GGUF library) allows attackers to achieve arbitrary code execution by tricking a use

CVE-2024-23496 HIGH POC
8.8 Feb 26

Remote code execution in llama.cpp (commit 18c2e17) occurs when the GGUF library's gguf_fread_str function parses a mali

CVE-2024-21836 HIGH POC
8.8 Feb 26

Heap-based buffer overflow in llama.cpp's GGUF library header parser (commit 18c2e17) enables code execution when a vict

CVE-2025-52566 HIGH POC
8.6 Jun 24

CVE-2025-52566 is a signed vs. unsigned integer overflow vulnerability in llama.cpp's tokenizer (llama_vocab::tokenize f

CVE-2026-34159 CRITICAL
9.8 Apr 01

Remote code execution in llama.cpp RPC backend allows unauthenticated attackers with TCP access to achieve arbitrary mem

CVE-2024-42478 MEDIUM POC
5.3 Aug 12

llama.cpp provides LLM inference in C/C++. Rated medium severity (CVSS 5.3), this vulnerability is remotely exploitable,

CVE-2026-43629 CRITICAL
9.2 Aug 06

Heap buffer overflow in llama.cpp's server KV cache state-restore path (builds b4882 through b9058) lets an attacker who

CVE-2026-118375 CRITICAL
9.2 Oct 28

Stack-based out-of-bounds write in llama.cpp's ggml-rpc RDMA receive path (builds b8841 through b11865) lets unauthentic

Vendor StatusVendor

SUSE

Severity: Moderate

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy