Skip to main content

llama.cpp CVE-2026-133710

| EUVDEUVD-2026-131537 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-11-20 VulnCheck GHSA-92hv-w2fh-9w89
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Craft GGUF model with wrapping layer factors
  2. Delivery
    Victim loads model via hrm-text loader
  3. Exploit
    Integer overflow bypasses block_count check
  4. Execution
    Out-of-bounds write past model.layers
  5. Impact
    Heap corruption enables code execution

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 an attacker-supplied GGUF model that uses the hrm-text architecture, with n_hrm_layers_per_stack / n_hrm_h_cycles / n_hrm_l_cycles metadata chosen so their 32-bit product wraps modulo 2^32 and equals n_layer(), bypassing the GGML_ASSERT block-count check in load_arch_hparams(). Limiting factors: the attack vector is local (AV:L) - the malicious model file must reach the victim's system - and it requires user interaction (UI:P): the victim must actually load the crafted model. It is only exploitable on vulnerable builds b11003 through b12555 (fixed in b12556) and only against the hrm-text loader code path; no authentication is required against the loading process, but no network-facing unauthenticated trigger exists.

Impact

This is a genuine but non-emergency priority. The input CVSS 4.0 vector (CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, score 8.5 High) is internally consistent with the description: the flaw is a file-parsing memory-corruption bug, so AV:L (the attacker must get a crafted GGUF model onto the victim's machine and have it loaded) and UI:P (a user must load the malicious model) correctly describe the mechanism rather than a remote, unauthenticated, wormable path. The high VC/VI/VA reflect realistic heap-corruption-to-code-execution impact (CWE-190 integer overflow leading to an out-of-bounds write past model.layers). No EPSS score was provided and the CVE is not listed in CISA KEV, so there is no active-exploitation signal; no public exploit identified at time of analysis - only the vendor patch/PR and VulnCheck advisory are referenced. The vuln.today decision label is 'this_week', not act_now or emergency, which aligns with the signals: high technical impact gated by required victim interaction and local delivery, with no evidence of exploitation in the wild. The practical risk centers on supply-chain-style distribution of malicious model files rather than mass remote attack.

Exploit ScenarioDerived

An attacker publishes or shares a malicious GGUF model file whose hrm-text metadata (layer/cycle factors) is crafted so the 32-bit product wraps modulo 2^32 and passes the block-count check. When a victim loads that model with a vulnerable llama.cpp build (b11003 through b12555), load_arch_tensors() writes tensor pointers past model.layers, corrupting the heap and potentially enabling code execution. No public exploit code is identified at time of analysis; the only released code artifact is the vendor fix.

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

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

Alert me

AnalysisAIv1 – Nov 20, 2026

Heap out-of-bounds write in llama.cpp's hrm-text GGUF model loader affects builds b11003 through b12555 and allows an attacker who gets a user to load a crafted model to corrupt heap memory and potentially execute code. Exploitation is local and requires user interaction; no authentication is required against the loading process, but there is no network-facing unauthenticated trigger, and the victim must open an attacker-supplied GGUF model whose n_hrm_layers_per_stack, n_hrm_h_cycles and n_hrm_l_cycles metadata produce a 32-bit product that wraps modulo 2^32 and matches n_layer(), bypassing the block-count check before load_arch_tensors() writes past model.layers. No public exploit identified at time of analysis; the vendor fix is b12556, and the supplied decision label is this_week, reflecting a genuine but non-emergency priority.

RemediationAI

Vendor-released patch: b12556; upgrade to that build or later. The fix is implemented in PR https://github.com/ggml-org/llama.cpp/pull/32601 and commit https://github.com/ggml-org/llama.cpp/commit/50518b64c6f2191a116d2760042f106c4b3387d7, and the fixed release is at https://github.com/ggml-org/llama.cpp/releases/tag/b12556. The patch replaces the 32-bit n_slot multiplication with uint64_t arithmetic and adds explicit checks that n_hrm_layers_per_stack is less than n_layer() and that n_slot equals n_layer(), throwing a runtime_error instead of allowing load_arch_tensors() to index past model.layers. Until the upgrade is applied, avoid loading GGUF models from untrusted sources, particularly models using the hrm-text architecture; this reduces exposure to attacker-supplied metadata but restricts use of third-party or community model files and does not repair the underlying loader defect. Consult the vendor release notes at https://github.com/ggml-org/llama.cpp/releases/tag/b12556 and the VulnCheck advisory at https://www.vulncheck.com/advisories/llama-cpp-b11003-before-b12556-heap-out-of-bounds-write-via-hrm-text-model-loader for the fixed build and details.

Affected VersionsENISA

llama.cpp b11003 <b12556

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

llama.cpp is a C/C++ inference engine for GGML/GGUF models, and the hrm-text architecture loader in src/models/hrm-text.cpp computes a cache-slot count from GGUF hyperparameters in load_arch_hparams(). The vulnerable code multiplies n_hrm_layers_per_stack, n_hrm_h_cycles and (n_hrm_l_cycles + 1) in 32-bit arithmetic and compares the result to n_layer() with GGML_ASSERT. Crafted GGUF metadata can make that product wrap modulo 2^32 and equal n_layer(), so the check passes even though the individual factors are inconsistent; load_arch_tensors() then indexes and writes tensor pointers past model.layers, producing a heap out-of-bounds write. This is CWE-190 integer overflow leading to memory corruption. The supplied CVSS 4.0 score is 8.5 (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N), and the independent assessment is CVSS 3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. The fix in b12556 changes the computation to uint64_t and adds explicit validation that n_hrm_layers_per_stack is less than n_layer() and that the computed slot count equals n_layer(), throwing a runtime_error on mismatch.

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

A crafted model file must be delivered locally and loaded by the victim, so AV:L and UI:R; no privileges are needed to trigger parsing (PR:N), and heap corruption yields full C/I/A impact.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/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
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

llama.cpp b11003 before b12556 contains an integer overflow in the hrm_text loader load_arch_hparams() that allows attackers to bypass the block count check using crafted GGUF metadata. Attackers can supply a GGUF model whose layer factors wrap modulo 2^32, causing load_arch_tensors() to write tensor pointers past model.layers, corrupting heap memory and potentially enabling code execution.

Executive ViewAI

Why It Matters

A heap memory corruption flaw in llama.cpp, a widely used open-source framework for running local AI language models, affects builds b11003 through b12555. Engineers or staff who download and load third-party model files are the ones exposed; the attacker must convince a user to open a crafted model file, so this is not remotely exploitable against the organization's systems at large. Leadership should care because the software underpins internal AI tooling and could be used as a foothold on developer workstations, warranting a routine but timely patch cycle rather than emergency action.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 75% exploitable
Prevalence
High
llama.cpp is a very widely used local LLM inference engine, broadly embedded
Data Quality
4 sources
Confidence: Medium

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.3%
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

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