Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-33298: CWE-122: Heap-based Buffer Overflow in ggml-org llama.cpp

0
High
VulnerabilityCVE-2026-33298cvecve-2026-33298cwe-122cwe-190
Published: Tue Mar 24 2026 (03/24/2026, 00:01:40 UTC)
Source: CVE Database V5
Vendor/Project: ggml-org
Product: llama.cpp

Description

CVE-2026-33298 is a high-severity heap-based buffer overflow vulnerability in the ggml-org llama. cpp library, affecting versions prior to b7824. The flaw arises from an integer overflow in the ggml_nbytes function when processing crafted GGUF files with malicious tensor dimensions, causing memory size miscalculations. This leads to a heap buffer overflow during tensor processing, enabling potential remote code execution via memory corruption. Exploitation requires local access and user interaction but no privileges. The vulnerability impacts confidentiality, integrity, and availability of affected systems. A fix is included in version b7824. No known exploits are currently reported in the wild. Organizations using llama. cpp for LLM inference should urgently update to the patched version to mitigate risk.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/31/2026, 20:27:57 UTC

Technical Analysis

CVE-2026-33298 is a heap-based buffer overflow vulnerability identified in the llama.cpp project by ggml-org, which provides C/C++ inference implementations for large language models (LLMs). The root cause is an integer overflow in the ggml_nbytes function responsible for calculating the memory size required for tensor data structures. When processing a specially crafted GGUF file containing tensor dimensions designed to trigger the overflow, ggml_nbytes returns a significantly smaller size than actually needed (for example, reporting 4MB instead of an exabyte-scale size). This miscalculation causes the application to allocate insufficient memory, leading to a heap buffer overflow when the tensor data is subsequently processed. The overflow can corrupt memory, potentially allowing an attacker to execute arbitrary code remotely. The vulnerability requires the attacker to supply a malicious GGUF file and for the victim to process it, implying user interaction and local vector. No privileges are required to trigger the flaw. The vulnerability is tracked under CWE-122 (Heap-based Buffer Overflow) and CWE-190 (Integer Overflow). The issue was fixed in commit b7824. The CVSS v3.1 base score is 7.8, reflecting high severity with attack vector local, low attack complexity, no privileges required, user interaction required, and high impact on confidentiality, integrity, and availability. No public exploits have been reported so far.

Potential Impact

This vulnerability poses a significant risk to organizations deploying llama.cpp for LLM inference, especially those processing untrusted GGUF files. Successful exploitation can lead to remote code execution, allowing attackers to execute arbitrary code with the privileges of the affected application. This can result in data breaches, system compromise, lateral movement within networks, and disruption of AI services. Given the increasing adoption of LLMs in various sectors including technology, research, and enterprise AI solutions, the impact can be widespread. Systems running vulnerable versions may be targeted to gain footholds or disrupt AI-driven workflows. The requirement for user interaction and local access somewhat limits remote exploitation but does not eliminate risk, particularly in environments where users process third-party or untrusted model files. The absence of known exploits in the wild provides a window for mitigation before active attacks emerge.

Mitigation Recommendations

Organizations should immediately update llama.cpp to version b7824 or later, which contains the patch fixing the integer overflow and buffer overflow issues. Until updates can be applied, implement strict validation and sanitization of GGUF files before processing, including verifying tensor dimensions and file integrity to prevent malformed inputs. Restrict access to systems running llama.cpp to trusted users and environments to reduce the risk of malicious file processing. Employ runtime protections such as memory safety tools (e.g., ASLR, DEP) and sandboxing to limit the impact of potential exploitation. Monitor logs and system behavior for anomalies indicative of exploitation attempts. Educate users about the risks of processing untrusted model files and enforce policies to avoid loading models from unverified sources. Regularly review and apply security advisories from ggml-org and related communities.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-18T18:55:47.427Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69c1debff4197a8e3babf86e

Added to database: 3/24/2026, 12:45:51 AM

Last enriched: 3/31/2026, 8:27:57 PM

Last updated: 5/9/2026, 3:14:20 AM

Views: 45

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses