Skip to main content

llama.cpp EUVDEUVD-2026-128233

| CVE-2026-126976 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-11-17 zdi GHSA-mgp8-8cpj-8cjj
7.0
CVSS 3.0 · Vendor: zdi
View

Attack ChainAIDerived

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

  1. Access
    Craft malicious audio projector GGUF
  2. Delivery
    Distribute via model hub or share
  3. Exploit
    Victim loads file in llama.cpp
  4. Execution
    Integer overflow in projector hparam parsing
  5. Persist
    Undersized buffer allocation
  6. Impact
    Execute arbitrary code in process context

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 the victim to load a maliciously crafted audio multimodal projector GGUF file into llama.cpp's MTMD/clip loader (tools/mtmd/clip.cpp). The crafted file must carry manipulated GGUF metadata values - such as oversized image_size, out-of-range n_mel_bins, or invalid audio FFT hparams (sample_rate/n_fft/window_len/hop_len) - that overflow the buffer-size computation before allocation, as evidenced by the patch adding explicit bounds checks and INT32_MAX guards on these GGUF-sourced values. Limiting factors that reduce realistic risk: the vector is local (AV:L) and demands user interaction (UI:R, opening the file), so it is not remotely triggerable; it requires multimodal/audio projector functionality to be in use; and AC:H indicates the overflow is not straightforward to trigger.

Impact

The input assigns CVSS 7.0 (High) with vector CVSS:3.0/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H, and the mitigating metrics dominate the real-world picture: AV:L means the malicious GGUF must be opened on the local system, AC:H indicates the integer overflow is not trivially triggered, and UI:R requires the victim to actively load the crafted file. PR:N (unauthenticated) only means the attacker needs no account on the target - it does not make this remotely exploitable. No EPSS score, no CISA KEV listing, and no confirmed public exploit code are present in the input; the only exploitation signal is a ZDI advisory and the vendor patch commit, consistent with a researcher-reported issue rather than observed mass exploitation. The vuln.today Decision label is this_week (not act_now/emergency), aligning with a serious-but-not-emergency priority. The most realistic risk is supply-chain-style: attackers distributing poisoned multimodal model files through model hubs so victims load them. Bottom line: a genuine RCE worth patching this week, but tempered by the local vector, required user interaction, and high attack complexity - not a drop-everything internet-facing emergency.

Exploit ScenarioDerived

An attacker publishes a malicious audio multimodal projector GGUF file (for example on a public model-sharing hub) with crafted GGUF metadata. A victim downloads and loads the model into llama.cpp's MTMD/clip loader, where an integer overflow occurs before a buffer allocation, leading to arbitrary code execution in the context of the llama.cpp process. Exploitation requires that specific user interaction (opening the file) and, per AC:H, non-trivial crafting of the overflow condition; no verified working public exploit code is identified in the input.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Nov 18, 2026

Integer overflow in llama.cpp's MTMD multimodal GGUF loader allows code execution in the context of the current process when a crafted audio multimodal projector file is opened. Affected are builds that parse GGUF multimodal projector metadata through tools/mtmd/clip.cpp and the mel-filterbank code in tools/mtmd/mtmd-audio.cpp; the assessed vector is CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H (High, 7.0), so the malicious file must be loaded locally and the victim must actively open it, and the overflow is rated as not straightforward to trigger. An upstream fix commit is published; no public exploit code was identified at time of analysis and the issue is not in CISA KEV.

RemediationAI

Apply the upstream fix commit e2e7a9b2d04e0404131e551243d4bd399ccfe606 (https://github.com/ggml-org/llama.cpp/commit/e2e7a9b2d04e0404131e551243d4bd399ccfe606) or rebuild/upgrade to a llama.cpp revision that contains it, since no independently confirmed tagged release version is provided in the available data; the patch introduces the image_size <= 65536 cap, the n_mel_bins [1, 256] bound for FFT-based projectors, mandatory positive audio FFT hparams, an INT32_MAX guard on GGUF u32 metadata reads, int64_t filterbank arithmetic and image dimension assertions. Until builds are updated, the effective compensating control is to avoid loading untrusted or third-party audio multimodal projector GGUF files from external sources - the trade-off is loss of functionality for untrusted model distribution, since only files passed through an internal provenance check can be trusted; deployments that do not need audio multimodal support can remove MTMD audio projector tooling from the build, accepting that multimodal audio inference becomes unavailable. Because exploitation requires the victim to actively open a crafted file (AV:L/UI:R), restricting file intake to reviewed model artifacts and avoiding automatic pipeline loading of downloaded GGUF files reduces exposure. Vendor advisory: https://www.zerodayinitiative.com/advisories/ZDI-26-954/.

Affected VersionsENISA

llama.cpp b8958

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

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

Technical ContextAI · show details

The flaw is a CWE-190 integer overflow reached while parsing GGUF metadata in llama.cpp's multimodal (MTMD) pipeline. Untrusted GGUF key/value pairs - image_size, n_mel_bins, audio_sample_rate, audio_n_fft, audio_window_len and audio_hop_len - are read and used to compute buffer sizes for the mel filterbank and related audio/image structures, and the resulting products (for example n_mel * n_fft_bins) can wrap before allocation, so a smaller-than-expected buffer is allocated and subsequently written past. The upstream fix (commit e2e7a9b2) shows the root cause precisely: it caps image_size at 65536, enforces n_mel_bins in [1, 256] for FFT-based projectors (with an explicit carve-out for PROJECTOR_TYPE_GEMMA4UA, which uses n_mel_bins as a 640-sample raw-waveform frame size), rejects non-positive sample_rate/n_fft/window_len/hop_len, adds an INT32_MAX sanity check on gguf_get_val_u32 results, widens mel/filterbank indices and offsets to int64_t, validates the n_mel * n_fft_bins allocation against SIZE_MAX, and adds GGML_ASSERT bounds on clip_image_size width/height (<= 46000) to avoid area-computation overflow. The patch also hardens frame padding logic in log_mel_spectrogram_worker_thread with a clamped valid_len, indicating the same class of arithmetic error affected the FFT path. The CPE cpe:2.3:a:llama.cpp:llama.cpp:*:*:*:*:*:*:*:* indicates all versions prior to the fix are in scope.

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 (zdi) PRIMARY 7.0 HIGH
AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Malicious file must be opened locally (AV:L, UI:R); no attacker privileges needed (PR:N); integer-overflow crafting is non-trivial (AC:H); arbitrary code execution yields full C:H/I:H/A:H.

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

Primary rating from Vendor (zdi).

CVSS VectorVendor: zdi

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

llama.cpp MTMD Multimodal GGUF File Parsing Integer Overflow Remote Code Execution Vulnerability. This vulnerability allows remote attackers to execute arbitrary code on affected installations of llama.cpp. User interaction is required to exploit this vulnerability in that the target must open a malicious file.

The specific flaw exists within the parsing of audio multimodal projector GGUF files. The issue results from the lack of proper validation of user-supplied data, which can result in an integer overflow before allocating a buffer. An attacker can leverage this vulnerability to execute arbitrary code in the context of the current process. Was ZDI-CAN-30980.

Executive ViewAI

Why It Matters

A high-severity integer overflow flaw in llama.cpp's multimodal GGUF loader could allow code execution when a crafted audio projector file is opened, impacting teams that use this tool for local AI model handling. Leadership should care because successful exploitation gives an attacker the same access as the user running llama.cpp, potentially compromising sensitive data or systems. The attack requires local file interaction and is not easily triggered, but a patch is available and should be prioritized.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 87% exploitable
Prevalence
High
widely-used open-source LLM inference engine with large deployment base
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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 HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
Medium
Technical Impact
Total

Priority Score

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

Attack Technique

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

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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-137567 CRITICAL
9.3 Nov 26

Unauthenticated remote attackers who can reach the ggml RPC server in llama.cpp b11450 before b12658 can exploit an out-

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