Skip to main content

llama.cpp EUVDEUVD-2026-110571

| CVE-2026-116840 MEDIUM
Integer Overflow or Wraparound (CWE-190)
2026-10-27 VulnCheck GHSA-52pf-v9gp-98qj
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Craft GGUF with near-SIZE_MAX tensor dims
  2. Delivery
    Deliver model file to victim
  3. Exploit
    Victim loads file in llama.cpp
  4. Execution
    Padding wraps to zero, bypasses size check
  5. Persist
    Undersized blob causes out-of-bounds reads
  6. Impact
    Crash or adjacent-memory disclosure

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

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

Exploitation Conditions

Exploitation requires a victim to load an attacker-crafted GGUF model file into a vulnerable llama.cpp build (b5854 up to but not including b11275). The specific precondition is a GGUF tensor whose computed ggml_nbytes is near SIZE_MAX (the patch's test uses F32 with ne=[4, 2^30-1, 2^30+1, 1], yielding 2^64-16) so that GGML_PAD's addition of (alignment-1) wraps the padded size to zero, defeating the CVE-2025-53630 size check and producing an undersized data blob. Exploitation is LIMITED by the local attack vector and required user interaction (UI:P) - the malicious file must be delivered to and opened/parsed by the victim; there is no remote or network trigger. No authentication is required (PR:N), but the practical gate is social delivery of the model file. Impact is bounded to out-of-bounds reads by consumers (availability/crash, limited info disclosure), not code execution per the available data.

Impact

This is a genuine but moderate-priority memory-safety flaw, not a top-tier emergency. The CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P) scores 6.9 (medium), and critically the attack vector is LOCAL with passive user interaction - the victim must load an attacker-supplied GGUF file - so this is not a remotely-triggerable network bug despite being unauthenticated. All real-world signals align toward lower urgency: EPSS is 0.13% (2nd percentile), SSVC reports Exploitation=none, Automatable=no, and Technical Impact=partial, and the vulnerability is NOT on the CISA KEV list. The vuln.today priority is 'this_month' rather than act_now/emergency, consistent with these signals. The primary impact is availability (VA:H - out-of-bounds reads by downstream consumers of the undersized data blob, leading to crashes) with only low confidentiality exposure (VC:L) and no integrity impact. There are no strongly conflicting signals here - low EPSS, no KEV, and non-automatable SSVC all agree this is a patch-in-routine-maintenance issue rather than a fire. The one nuance: the triggering mechanism IS well understood from the patch diff (GGML_PAD adds alignment-1 to nbytes; near SIZE_MAX this wraps to 0, nullifying the CVE-2025-53630 size check), so this is a confirmed, reproducible bug with a vendor test case, not a theoretical one.

Exploit ScenarioDerived

An attacker publishes a malicious GGUF model file (e.g., on a model-sharing hub) whose tensor dimensions are chosen so ggml_nbytes approaches SIZE_MAX and the padded size wraps to zero; a victim downloads and loads it into a vulnerable llama.cpp build (b5854 up to b11275). During parsing the bypassed size check allocates an undersized data blob, and subsequent tensor access performs out-of-bounds reads, crashing the process or leaking adjacent memory. The vendor's patch ships a handcrafted test case (TENSORS_NBYTES_PAD_WRAP) demonstrating the overflow, but no weaponized exploit is confirmed.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Oct 28, 2026

Integer overflow in llama.cpp's GGUF loader (gguf_init_from_reader) lets a crafted model file defeat the size validation added for CVE-2025-53630: a tensor whose computed byte size lands near SIZE_MAX pads to zero, so the loader accepts an undersized data blob that downstream consumers then read past. Builds b5854 up to but not including b11275 are affected, along with the corresponding 0.1.0 to before-0.6.0 semver range. Exploitation requires a victim to open a malicious GGUF file (local attack vector, user interaction, no authentication), and impact is bounded to out-of-bounds reads - crashes, denial of service, and limited information disclosure - rather than code execution; exploitation is not observed in the wild (SSVC exploitation: none) and EPSS is low at 0.13% (2nd percentile), with the vendor fix shipping in b11275.

RemediationAI

Update to llama.cpp b11275 or later, which contains the guard added in PR 26979 (https://github.com/ggml-org/llama.cpp/pull/26979, commit a6ea155d3d38b3f6f43d0c0dc29c2d592413ef44) that rejects tensors whose nbytes exceeds SIZE_MAX - (alignment - 1) before GGML_PAD is applied; the release is at https://github.com/ggml-org/llama.cpp/releases/tag/b11275, and vendor patch availability is confirmed. Because the flaw is only reachable by parsing an attacker-supplied model file, organizations that cannot upgrade immediately should stop loading GGUF files from untrusted or unvetted sources into affected builds - restricting model ingestion to an allowlist of internally produced or checksum-verified artifacts closes the practical delivery path, at the cost of blocking legitimate third-party model downloads. Deployments that must accept external models can instead pre-screen files with an independent GGUF parser or metadata inspector that rejects tensors with absurd dimensions or nbytes values near SIZE_MAX, with the trade-off that this adds a validation step outside the vendor's code path and must be maintained as the format evolves. There is no network-level workaround, since the vector is a local file being opened; the only complete fix is updating to b11275 or later.

Affected VersionsENISA

llama.cpp b5854 <b11275
llama.cpp 0.1.0 <0.6.0

Affected Packages

euvd llama_cpp fix: 0.6.0

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

GGUF is the binary model-container format used by llama.cpp and the wider ggml ecosystem; gguf_init_from_reader parses tensor metadata and validates that each declared tensor's data fits within the file. The size computation goes through ggml_nbytes(), which multiplies the tensor's dimensions by the element size of its ggml_type, and then through the GGML_PAD macro, which rounds the size up by adding (alignment - 1). Because these are size_t (64-bit) arithmetic operations, a tensor dimension set chosen so that ggml_nbytes() lands within alignment-1 bytes of SIZE_MAX causes the padded size to wrap around to zero. The upstream regression test demonstrates the arithmetic with an F32 tensor of ne = [4, 2^30-1, 2^30+1, 1], which yields 2^64 - 16 bytes. When the padded size wraps to zero, the bounds check introduced for CVE-2025-53630 becomes effectively dead and the reader accepts a data blob far smaller than the tensor actually describes; consumers that later dereference tensor data read beyond the buffer. This is CWE-190 (integer overflow or wraparound) manifesting as a heap out-of-bounds read, and the fix in PR 26979 adds an explicit guard rejecting any tensor where nbytes > SIZE_MAX - (alignment - 1) before padding is applied. The trigger is an attacker-supplied file parsed by the vulnerable build; no network-facing code path is involved.

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.9 MEDIUM
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

File must be locally loaded (AV:L) and opened by the victim (UI:R); no auth (PR:N); out-of-bounds reads cause crashes (A:H) and minor info leak (C:L), no integrity impact.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

llama.cpp b5854 before b11275 contains an integer overflow vulnerability in gguf_init_from_reader that bypasses the CVE-2025-53630 size check when padding near-SIZE_MAX tensor sizes. Attackers can supply a crafted GGUF file whose tensor size pads to zero, causing an undersized data blob and out-of-bounds reads by consumers.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
High
extremely popular open-source local LLM inference engine, widely deployed
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.1%
Patch available Yes
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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
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.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

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

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