CVE-2026-33298 llama.cpp has a Heap Buffer Overflow via Integer Overflow in GGUF Tensor Parsing

High 7.8 Published Updated

An integer overflow in llama.cpp allows attackers to trigger a heap buffer overflow via crafted GGUF files, potentially leading to remote code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-33298?

CVE-2026-33298 is a high-severity vulnerability in ggml-org llama.cpp, published on 24 Mar 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-190, CWE-122

Which versions are affected by CVE-2026-33298?

It affects 1 product.

Products include Ggml Llama.cpp.

How do I fix CVE-2026-33298?

Upgrade to a fixed version.

Is CVE-2026-33298 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-33298 exists.

Sources

Also known as DEBIAN-CVE-2026-33298, GHSA-96jg-mvhq-q7q7, UBUNTU-CVE-2026-33298.

Is CVE-2026-33298 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free