The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-33298

CVE-2026-33298: llama.cpp Integer Overflow RCE Vulnerability

CVE-2026-33298 is an integer overflow vulnerability in llama.cpp that enables remote code execution through crafted GGUF files. This article covers the technical details, affected versions, impact, and mitigation.

Published: March 27, 2026

CVE-2026-33298 Overview

An integer overflow vulnerability has been discovered in llama.cpp, a popular C/C++ library for LLM inference. The vulnerability exists in the ggml_nbytes function, which can be exploited by an attacker through a maliciously crafted GGUF model file with specific tensor dimensions. When the integer overflow occurs, the function returns a significantly smaller memory size than required (e.g., 4MB instead of exabytes), leading to a heap-based buffer overflow during subsequent tensor processing operations.

Critical Impact

This vulnerability enables potential Remote Code Execution (RCE) through memory corruption when processing malicious GGUF model files.

Affected Products

  • llama.cpp versions prior to b7824
  • Applications and services built on vulnerable llama.cpp versions
  • AI/ML inference pipelines using GGUF model format with affected llama.cpp builds

Discovery Timeline

  • 2026-03-24 - CVE-2026-33298 published to NVD
  • 2026-03-24 - Last updated in NVD database

Technical Details for CVE-2026-33298

Vulnerability Analysis

The vulnerability is classified as CWE-122 (Heap-based Buffer Overflow). The root issue lies in how the ggml_nbytes function calculates memory requirements for tensor operations. When processing GGUF files with carefully crafted tensor dimensions, an integer overflow can occur in the size calculation, causing the function to return a drastically undersized value.

This miscalculation has severe consequences: when the application allocates memory based on the erroneously small size and then attempts to write the actual tensor data, it overflows the heap buffer. This heap-based buffer overflow can corrupt adjacent memory structures, potentially allowing an attacker to achieve arbitrary code execution.

The attack requires local access and user interaction—specifically, convincing a user to load a malicious GGUF model file. Given the increasing adoption of local LLM inference tools, this attack surface is particularly relevant as users frequently download and run community-created model files.

Root Cause

The vulnerability stems from insufficient bounds checking in the ggml_nbytes function when computing tensor memory sizes. The function performs arithmetic operations on tensor dimensions without properly validating that the result fits within the expected integer range. When tensor dimensions are crafted to cause an integer overflow, the size calculation wraps around to a small value, bypassing subsequent memory validation checks.

Attack Vector

The attack requires local access with user interaction. An attacker must craft a malicious GGUF model file containing tensor definitions with specific dimensions designed to trigger the integer overflow. When a victim loads this file using a vulnerable version of llama.cpp, the following attack chain executes:

  1. The malicious GGUF file is parsed, and the crafted tensor dimensions are read
  2. The ggml_nbytes function calculates the memory size, triggering an integer overflow
  3. A small heap buffer is allocated based on the incorrect size (e.g., 4MB)
  4. The application attempts to write the full tensor data, overflowing the buffer
  5. Adjacent heap memory is corrupted, potentially allowing code execution

Detection Methods for CVE-2026-33298

Indicators of Compromise

  • Unusual GGUF model files with abnormally large tensor dimension values
  • Application crashes or segmentation faults when loading GGUF models
  • Unexpected memory allocation patterns during model inference operations
  • Heap corruption signatures in application crash dumps

Detection Strategies

  • Monitor for unusual file operations involving GGUF model files from untrusted sources
  • Implement application crash monitoring for llama.cpp-based services
  • Deploy memory corruption detection tools (AddressSanitizer, Valgrind) in development/testing environments
  • Review logs for repeated model loading failures that may indicate exploitation attempts

Monitoring Recommendations

  • Enable heap canary protections and monitor for violations
  • Implement file integrity monitoring for model file directories
  • Track and audit sources of GGUF model files loaded by production systems
  • Configure endpoint detection to alert on anomalous memory allocation patterns in AI inference workloads

How to Mitigate CVE-2026-33298

Immediate Actions Required

  • Upgrade llama.cpp to version b7824 or later immediately
  • Audit all deployed instances of llama.cpp and dependent applications
  • Restrict model file sources to trusted repositories until patching is complete
  • Implement input validation for GGUF files before processing

Patch Information

The vulnerability has been addressed in llama.cpp release b7824. The fix implements proper bounds checking in the ggml_nbytes function to prevent integer overflow during tensor size calculations. Organizations should update to this version or later immediately.

For detailed patch information, refer to the GitHub Release Note and the GitHub Security Advisory.

Workarounds

  • Only load GGUF model files from verified and trusted sources
  • Implement application-level sandboxing for model inference processes
  • Deploy memory protection mechanisms such as ASLR and DEP on systems running llama.cpp
  • Consider containerization with restricted memory access for AI inference workloads
bash
# Verify llama.cpp version and upgrade
# Check current version
git describe --tags

# Update to patched version b7824 or later
git fetch --all --tags
git checkout b7824

# Rebuild llama.cpp
mkdir -p build && cd build
cmake ..
cmake --build . --config Release

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechLlama Cpp

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-122
  • Technical References
  • GitHub Release Note

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-34159: llama.cpp RPC Backend RCE Vulnerability

  • CVE-2026-21869: llama.cpp RCE Vulnerability

  • CVE-2026-27940: llama.cpp Buffer Overflow Vulnerability

  • CVE-2026-2069: llama.cpp Buffer Overflow Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English