CVE-2024-23751

LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine, SQLTableRetrieverQueryEngine…

Critical · published January 22, 2024

CVSS v3.1
9.8
EPSS
1%
Percentile
50.7
In the wild
Unconfirmed
What it is

🚨 SQL injection through plain English commands? Yes, please! This critical vulnerability in LlamaIndex (up to version 0.9.34) lets attackers perform devastating actions—like deleting entire student records—just by typing a simple command. 🔥 Think of it like a restaurant where the chef takes orders literally, without checking if the ingredients are safe first. If a mischievous diner can just say, 'Remove all the dishes from the kitchen,' the whole menu goes poof! An attacker could easily manipulate the SQL queries through the Text-to-SQL feature, leading to catastrophic consequences such as deleting crucial data or compromising the integrity of your database. Imagine a malicious actor wiping out student records with a casual sentence—absolutely devastating!

Put simply

Think of it like a restaurant where the chef takes orders literally, without checking if the ingredients are safe first. If a mischievous diner can just say, 'Remove all the dishes from the kitchen,' the whole menu goes poof! This vulnerability occurs in multiple components of LlamaIndex, allowing SQL injection via user input in the NLSQLTableQueryEngine and others. This means that an attacker can execute arbitrary SQL commands, turning friendly queries into malicious actions.

What to do

An attacker could easily manipulate the SQL queries through the Text-to-SQL feature, leading to catastrophic consequences such as deleting crucial data or compromising the integrity of your database. Imagine a malicious actor wiping out student records with a casual sentence—absolutely devastating! Immediate remediation involves upgrading LlamaIndex to the latest version beyond 0.9.34. Additionally, implement input validation and parameterized queries to safeguard against such attacks in the future. You've got this! Follow these steps, and you'll be back in control of your data in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00660 · 50.7th percentile
Published
2024-01-22T00:00Z
EPSS history
Timeline
  • 22 JAN 00:00Z
    LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine, SQLTableRetrieverQueryEngine…
    cvelistv5