CVE-2026-116840: llama.cpp integer overflow in gguf_init_from_reader

CVE-2026-116840 · Severity: medium · CVSS 6.1 · Published 2026-10-27

llama.cpp is a machine learning inference library that loads AI models from GGUF files. An integer overflow vulnerability allows attackers to supply a maliciously crafted GGUF file that bypasses size validation checks, causing the library to read from undersized data regions and potentially exposing sensitive data or causing crashes.

Technologies: GGML Llama.Cpp. Vendors: GGML.

Quick answers

Is CVE-2026-116840 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-116840 being exploited in the wild.
How severe is CVE-2026-116840?
Medium severity, with a CVSS score of 6.1, published 27 October 2026.
Which products and versions are affected?
GGML Llama.Cpp b5854 before b11275.
Is there a fix for CVE-2026-116840?
Yes: fixed in b11275 and later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-116840 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-116840?
Check whether you run GGML Llama.Cpp at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: b11275 and later

Technical details

An integer overflow in gguf_init_from_reader occurs when tensor sizes near SIZE_MAX are padded to a multiple of the alignment requirement, causing the result to wrap to zero and bypass the CVE-2025-53630 size check. An attacker can craft a GGUF file with a tensor of size (SIZE_MAX - 15) that pads to zero, resulting in an undersized data blob that causes out-of-bounds reads when the model is loaded.

Affected products

  • GGML llama.cpp b5854 before b11275

Timeline

  • 2026-10-27: disclosed
  • other: Prior CVE-2025-53630 addressed related size overflow checks

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.