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-23751

CVE-2024-23751: LlamaIndex SQL Injection Vulnerability

CVE-2024-23751 is an SQL injection flaw in LlamaIndex's Text-to-SQL components that allows attackers to execute malicious SQL commands through natural language input. This article covers technical details, affected versions, and mitigations.

Published: April 15, 2026

CVE-2024-23751 Overview

CVE-2024-23751 is a SQL Injection vulnerability affecting LlamaIndex (also known as llama_index) through version 0.9.34. The vulnerability exists in the Text-to-SQL feature, which is implemented across multiple query engine components including NLSQLTableQueryEngine, SQLTableRetrieverQueryEngine, NLSQLRetriever, RetrieverQueryEngine, and PGVectorSQLQueryEngine. This flaw allows attackers to inject malicious SQL commands through natural language input, potentially leading to unauthorized data access, modification, or deletion.

Critical Impact

Attackers can execute arbitrary SQL commands through natural language input, enabling complete database compromise including data exfiltration, modification, and deletion of critical records.

Affected Products

  • LlamaIndex (llama_index) versions through 0.9.34
  • NLSQLTableQueryEngine component
  • SQLTableRetrieverQueryEngine, NLSQLRetriever, RetrieverQueryEngine, and PGVectorSQLQueryEngine components

Discovery Timeline

  • 2024-01-22 - CVE-2024-23751 published to NVD
  • 2025-06-20 - Last updated in NVD database

Technical Details for CVE-2024-23751

Vulnerability Analysis

This SQL Injection vulnerability (CWE-89) resides in the Text-to-SQL feature of LlamaIndex, a popular framework for building LLM-powered applications. The vulnerability arises from insufficient input validation and sanitization when converting natural language queries into SQL statements. The Text-to-SQL functionality is designed to translate user-provided English language queries into executable SQL commands, but lacks proper safeguards against malicious input that could result in destructive database operations.

The affected components span multiple query engines within the LlamaIndex framework, indicating a fundamental design flaw in how user input is processed before SQL generation. An attacker can craft natural language inputs that, when processed by the vulnerable Text-to-SQL feature, generate malicious SQL statements. For example, a seemingly innocent query like "Drop the Students table" could be interpreted literally, resulting in the execution of a DROP TABLE command against the connected database.

Root Cause

The root cause of CVE-2024-23751 is improper input validation in the natural language processing pipeline that converts user queries to SQL. The Text-to-SQL feature fails to implement adequate controls to distinguish between legitimate data retrieval requests and potentially destructive database operations. The framework lacks semantic analysis to detect and block SQL commands that could modify database schema or delete records, treating all natural language input as trusted and converting it directly to executable SQL without proper sanitization or command whitelisting.

Attack Vector

The attack vector for this vulnerability is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by providing malicious natural language input to any application utilizing the affected LlamaIndex Text-to-SQL components. The attack flow involves:

  1. Identifying an application using LlamaIndex's Text-to-SQL functionality
  2. Crafting natural language input containing destructive SQL intent (e.g., "Drop the Students table" or "Delete all records from the Users table")
  3. Submitting the malicious input through the application's interface
  4. The vulnerable component translates the input into executable SQL
  5. The malicious SQL executes against the backend database

The vulnerability is particularly dangerous because it bypasses traditional SQL injection defenses—the input isn't SQL syntax but natural language that gets converted to SQL by the LLM-powered translation layer.

Detection Methods for CVE-2024-23751

Indicators of Compromise

  • Unexpected database schema changes such as dropped tables or modified structures
  • Unusual DELETE or DROP statements in database query logs
  • Natural language queries containing database-specific terminology like "drop", "delete", "truncate", or "alter"
  • Sudden data loss or corruption in database tables accessed through LlamaIndex applications

Detection Strategies

  • Implement query logging for all Text-to-SQL operations to capture the generated SQL statements before execution
  • Deploy database activity monitoring to detect anomalous DDL (Data Definition Language) or destructive DML operations
  • Create alerting rules for SQL statements containing DROP, DELETE, TRUNCATE, or ALTER keywords originating from LlamaIndex components
  • Monitor application logs for unusual natural language query patterns that may indicate exploitation attempts

Monitoring Recommendations

  • Enable verbose logging in LlamaIndex applications to capture both input queries and generated SQL
  • Implement real-time database audit trails with alerts for destructive operations
  • Deploy application-level monitoring to track the frequency and content of Text-to-SQL requests
  • Establish baseline metrics for normal query patterns to identify anomalous behavior

How to Mitigate CVE-2024-23751

Immediate Actions Required

  • Upgrade LlamaIndex to a version newer than 0.9.34 that includes patches for this vulnerability
  • Audit all applications using LlamaIndex Text-to-SQL features to identify exposure
  • Implement database user permissions that restrict destructive operations (DROP, DELETE, TRUNCATE) for accounts used by LlamaIndex
  • Review database logs for any signs of past exploitation

Patch Information

The vulnerability was disclosed through the LlamaIndex GitHub Issue #9957. Users should monitor the official LlamaIndex repository for security patches and upgrade to the latest stable release that addresses this SQL injection vulnerability. Review the GitHub issue for detailed patch information and recommended upgrade paths.

Workarounds

  • Implement a SQL query allow-list that only permits SELECT statements from Text-to-SQL operations
  • Deploy a database proxy or firewall that blocks DDL statements and destructive DML operations from LlamaIndex application connections
  • Use read-only database credentials for LlamaIndex Text-to-SQL components where write access is not required
  • Add input pre-processing to filter natural language queries containing potentially dangerous keywords before they reach the Text-to-SQL engine
bash
# Example: Create restricted database user for LlamaIndex
# This limits the potential damage from SQL injection
CREATE USER llamaindex_reader WITH PASSWORD 'secure_password';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO llamaindex_reader;
REVOKE INSERT, UPDATE, DELETE, DROP ON ALL TABLES IN SCHEMA public FROM llamaindex_reader;

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

  • Vulnerability Details
  • TypeSQLI

  • Vendor/TechLlamaindex

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.36%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-89
  • Vendor Resources
  • GitHub Issue Discussion
  • Related CVEs
  • CVE-2025-1750: Llamaindex DuckDBVectorStore SQLi Vulnerability

  • CVE-2025-1793: Llamaindex SQL Injection Vulnerability

  • CVE-2024-12909: Llamaindex SQL Injection Vulnerability

  • CVE-2024-11958: Llamaindex SQL Injection 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