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


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

Social Trends
EPSS
0.48% (38th 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-DEBIAN14-LLAMACPP-16066072
  • published15 Apr 2026
  • disclosed24 Mar 2026

Introduced: 24 Mar 2026

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

How to fix?

Upgrade Debian:14 llama.cpp to version 7965+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:14 relevant fixed versions and status.

llama.cpp is an inference of several LLM models in C/C++. Prior to b7824, an integer overflow vulnerability in the ggml_nbytes function allows an attacker to bypass memory validation by crafting a GGUF file with specific tensor dimensions. This causes ggml_nbytes to return a significantly smaller size than required (e.g., 4MB instead of Exabytes), leading to a heap-based buffer overflow when the application subsequently processes the tensor. This vulnerability allows potential Remote Code Execution (RCE) via memory corruption. b7824 contains a fix.