LlamaIndex vulnerable to Creation of Temporary File in Directory with Insecure Permissions
The default_jsonalyzer function in JSONalyzeQueryEngine is vulnerable to SQL injection via prompt injection, allowing an attacker to create arbitrary files and cause denial of service. The issue is fixed in version 0.12.3.
run-llama/llama_index
Originally disclosed on huntr
A vulnerability in the default_jsonalyzer function of the JSONalyzeQueryEngine in the run-llama/llama_index repository allows for SQL injection via prompt injection. This can lead to arbitrary file creation and Denial-of-Service (DoS) attacks. The vulnerability affects the latest version and is fixed in version 0.12.3.
From the GitHub Advisory Database (GHSA-jmgm-gx32-vp4w, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the default_jsonalyzer function fails to properly sanitise or validate the SQL query generated from user-supplied natural language input, allowing prompt injection to influence the SQL command.
Impact
An attacker could create arbitrary files and cause a denial-of-service, potentially disrupting the service.
What the attacker needed
Access to the JSONalyzeQueryEngine; ability to supply natural language input
The fix
The vulnerability was fixed in version 0.12.3.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a bug in a tool that lets you ask questions about data using natural language. The tool turns your question into a database command, but it does not check if the question contains harmful instructions. An attacker could trick it into running dangerous database commands, which might create unwanted files or crash the system.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.