Skip to content
SQL injection Disclosed report Intermediate CVE-2024-12911

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).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

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.

More from run-llama/llama_index

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.