---
id: "CVE-2026-116829"
kind: "vulnerability"
aliases: ["CVE-2026-116829"]
title: "llama.cpp: crafted GGUF model file overflows tensor sizes, enabling out-of-bounds memory access"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "ai-tooling"
products: []
ecosystems: []
tags: ["ai-tooling", "gguf", "llama.cpp", "local-llm", "self-hosted"]
not_affected_if: ["builds-at-or-after-b11301", "no-untrusted-model-files"]
published_at: "2026-10-27T01:19:06+00:00"
first_seen_at: "2026-10-27T01:34:33+00:00"
updated_at: "2026-10-27T01:36:24+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116829", "first_seen_at": "2026-10-27T01:34:33+00:00"}]
---

# llama.cpp: crafted GGUF model file overflows tensor sizes, enabling out-of-bounds memory access

llama.cpp builds before b11301 fail to validate tensor element counts when loading GGUF model files, so a crafted shape can wrap to zero and bypass the check. Buffers are then sized from the wrapped byte counts, which lets an attacker cause out-of-bounds memory access when the file is loaded.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `llama-cli --version` or check the build tag of the llama.cpp binary in use; builds from `b10398` up to but not including `b11301` are listed as affected.
- Check whether the service loads GGUF files from untrusted sources (user uploads, arbitrary Hugging Face downloads).

## Fix

- Upgrade llama.cpp to `b11301` or later.
- Only load GGUF model files from trusted sources until the upgrade is done.

## Timeline

- 2026-10-27T01:34:33+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-116829

## From the sources

llama.cpp b10398 before b11301 contains an integer overflow vulnerability in gguf_init_from_reader that allows attackers to bypass tensor element-count validation by supplying shapes whose product wraps to zero. Attackers can craft GGUF files with enormous tensor extents that overflow ggml_nbytes() and strides, causing out-of-bounds memory access when buffers are sized from wrapped byte counts.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
