Heap-based Buffer Overflow Affecting llama.cpp package, versions <8461+dfsg-1


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.18% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-DEBIANUNSTABLE-LLAMACPP-15669304
  • published16 Mar 2026
  • disclosed12 Mar 2026

Introduced: 12 Mar 2026

CVE-2026-27940  (opens in a new tab)
CWE-122  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade Debian:unstable llama.cpp to version 8461+dfsg-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream llama.cpp package and not the llama.cpp package as distributed by Debian. See How to fix? for Debian:unstable relevant fixed versions and status.

llama.cpp is an inference of several LLM models in C/C++. Prior to b8146, the gguf_init_from_file_impl() in gguf.cpp is vulnerable to an Integer overflow, leading to an undersized heap allocation. Using the subsequent fread() writes 528+ bytes of attacker-controlled data past the buffer boundary. This is a bypass of a similar bug in the same file - CVE-2025-53630, but the fix overlooked some areas. This vulnerability is fixed in b8146.