Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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-2024-58339

CVE-2024-58339: LlamaIndex VannaPack DoS Vulnerability

CVE-2024-58339 is a denial-of-service flaw in LlamaIndex VannaPack that allows attackers to exhaust system resources through unbounded SQL queries. This article covers the technical details, affected versions, and mitigations.

Updated: January 22, 2026

CVE-2024-58339 Overview

LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 contain an uncontrolled resource consumption vulnerability (CWE-770) in the VannaPack VannaQueryEngine implementation. The custom_query() logic generates SQL statements from a user-supplied prompt and executes them via vn.run_sql() without enforcing query execution limits. In downstream deployments where untrusted users can supply prompts, an attacker can trigger expensive or unbounded SQL operations that exhaust CPU or memory resources, resulting in a denial-of-service condition.

Critical Impact

This vulnerability allows remote unauthenticated attackers to cause denial-of-service conditions by submitting crafted prompts that generate resource-intensive SQL queries, potentially exhausting server CPU and memory resources.

Affected Products

  • LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2
  • Applications using VannaPack VannaQueryEngine with untrusted user input
  • Downstream deployments accepting user-supplied prompts for SQL generation

Discovery Timeline

  • 2026-01-12 - CVE CVE-2024-58339 published to NVD
  • 2026-01-13 - Last updated in NVD database

Technical Details for CVE-2024-58339

Vulnerability Analysis

The vulnerability resides in the VannaPack VannaQueryEngine component of LlamaIndex, specifically within the custom_query() function located in llama_index/packs/vanna/base.py. This function accepts user-provided natural language prompts, translates them into SQL statements using the Vanna text-to-SQL engine, and then executes those statements directly against the underlying database via the vn.run_sql() method.

The core security flaw is the absence of any query execution limits, timeouts, or resource consumption controls when processing user input. This design allows malicious actors to craft prompts that generate computationally expensive SQL operations such as full table scans, complex JOIN operations across large datasets, recursive queries, or operations that return massive result sets.

When deployed in environments where untrusted users have access to the prompt interface, an attacker can systematically submit prompts designed to trigger these resource-intensive database operations. The resulting SQL execution can rapidly consume available CPU cycles and memory, effectively denying service to legitimate users.

Root Cause

The root cause is improper implementation of resource management controls in the custom_query() function. The code path from user prompt to SQL execution lacks:

  • Query timeout enforcement
  • Result set size limits
  • CPU/memory consumption boundaries
  • Query complexity analysis or rejection
  • Rate limiting on query submissions

This is classified as CWE-770 (Allocation of Resources Without Limits or Throttling), where the application fails to restrict the amount of resources consumed when processing external input.

Attack Vector

The attack vector is network-based, requiring no authentication and no user interaction. An attacker with network access to a LlamaIndex deployment using VannaQueryEngine can exploit this vulnerability by:

  1. Identifying an application endpoint that accepts natural language prompts for SQL generation
  2. Crafting prompts that will generate resource-intensive SQL operations (e.g., "Show me all possible combinations of all records across all tables")
  3. Submitting multiple such prompts to amplify the resource exhaustion effect
  4. Causing denial-of-service to legitimate users as the database and application resources become exhausted

The vulnerability exists in the custom_query() function in llama_index/packs/vanna/base.py, where SQL statements generated from user prompts are executed without any protective measures against resource abuse.

Detection Methods for CVE-2024-58339

Indicators of Compromise

  • Unusual spikes in database CPU or memory utilization correlated with VannaQueryEngine activity
  • Long-running SQL queries originating from LlamaIndex application processes
  • Increased frequency of prompt submissions from single sources or IP addresses
  • Database connection pool exhaustion or timeout errors
  • Application performance degradation coinciding with prompt processing

Detection Strategies

  • Monitor database query execution times and set alerts for queries exceeding reasonable thresholds
  • Implement logging for all prompts submitted to VannaQueryEngine and review for suspicious patterns
  • Track resource consumption metrics for application processes using VannaPack components
  • Configure database-level query timeouts and monitor for timeout events
  • Use application performance monitoring (APM) tools to identify abnormal resource consumption patterns

Monitoring Recommendations

  • Enable detailed query logging in the database backend to capture all executed SQL statements
  • Set up alerts for CPU and memory utilization thresholds on servers running LlamaIndex applications
  • Monitor for unusual patterns in prompt length, complexity, or submission frequency
  • Implement connection and query metrics collection for VannaQueryEngine database interactions

How to Mitigate CVE-2024-58339

Immediate Actions Required

  • Review deployments using LlamaIndex VannaPack VannaQueryEngine for exposure to untrusted user input
  • Implement database-level query timeouts and resource limits as a defense-in-depth measure
  • Add rate limiting on endpoints that accept user prompts for SQL generation
  • Restrict access to VannaQueryEngine-powered features to authenticated and authorized users only
  • Monitor for updates from the LlamaIndex project addressing this vulnerability

Patch Information

As of the last NVD update on 2026-01-13, organizations should monitor the LlamaIndex GitHub repository for security updates addressing this vulnerability. Review the VulnCheck Advisory and Huntr Vulnerability Report for the latest remediation guidance.

Workarounds

  • Implement a wrapper around custom_query() that enforces query execution timeouts
  • Add input validation and prompt sanitization before passing to VannaQueryEngine
  • Deploy database-level query governors to limit execution time and resource consumption
  • Use network-level rate limiting to prevent rapid submission of malicious prompts
  • Consider using a read replica or separate database instance for VannaQueryEngine queries to isolate potential impact
bash
# Example database-level timeout configuration (PostgreSQL)
# Set statement timeout to prevent long-running queries
ALTER DATABASE llama_db SET statement_timeout = '30s';

# Set work_mem to limit memory per operation
ALTER DATABASE llama_db SET work_mem = '64MB';

# Enable query logging for monitoring
ALTER DATABASE llama_db SET log_min_duration_statement = 1000;

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechLlama Index

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-770
  • Technical References
  • GitHub Llama Index Repository

  • Huntr Vulnerability Bounty

  • Llama Index Official Website

  • VulnCheck Advisory on LlamaIndex
  • Related CVEs
  • CVE-2025-6208: llama_index.core DoS Vulnerability

  • CVE-2024-14021: LlamaIndex Unsafe Deserialization Vulnerability

  • CVE-2024-3098: llama_index safe_eval RCE Vulnerability
Default Legacy - Prefooter | 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