---
id: "CVE-2026-116840"
kind: "vulnerability"
aliases: ["CVE-2026-116840"]
title: "llama.cpp: crafted GGUF model file causes out-of-bounds reads"
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: ["newer-build", "trusted-models-only"]
published_at: "2026-10-27T01:19:07+00:00"
first_seen_at: "2026-10-27T01:34:33+00:00"
updated_at: "2026-10-27T01:36:26+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116840", "first_seen_at": "2026-10-27T01:34:33+00:00"}]
---

# llama.cpp: crafted GGUF model file causes out-of-bounds reads

llama.cpp's GGUF model loader has an integer overflow in gguf_init_from_reader that skips an earlier size check when tensor sizes are near the maximum value. A crafted GGUF file can make the tensor data blob undersized, so consumers read past the end of the buffer.

_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 and confirm it is b5854 or later but before b11275
- Check whether the deployment loads GGUF files from untrusted sources

## Fix

- Upgrade llama.cpp to `b11275` or later
- Only load GGUF models from trusted sources until upgraded

## Timeline

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

## From the sources

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.

---

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