CVE-2025-1793: llama_index vulnerable to SQL Injection
CVE-2025-1793 is a set of SQL injection flaws in several vector store integrations of LlamaIndex (run-llama/llama_index), reported against v0.12.21. An attacker who controls values passed to those stores can read and write data with SQL. The package data lists llama-index 0.12.28 as the fixed version.
Published Jun 5, 2025 · Updated Jul 21, 2026 · Analysis Nov 1, 2026
What an attacker can do
Several vector store integrations built SQL statements by putting caller-supplied values into the query text. In a web application where user input reaches those calls, for example a filter, a table name or a query string, an attacker can append SQL of their own. The advisory says this allows both reading and writing data, and may expose the data of other users depending on how the application uses the library.
The fix commit is titled "patch multiple sql-injection vulnerabilities (#18316)". Its changelog names eight integrations that received version bumps: ClickHouse, Couchbase, Deep Lake, Jaguar, Lantern, Nile, OracleDB and SingleStoreDB. The page does not show the code diffs, so we do not describe the exact technique.
The CVSS 3.0 vector (9.8) is network, low complexity, no privileges, no user interaction. In practice the exposure depends on whether an unauthenticated user can influence the parameters passed to the store, such as in a RAG chatbot that lets users set metadata filters. A successful attacker can pull other tenants' documents or change stored vectors, which also lets them poison what the model retrieves.
Who is affected
The pip package llama-index before 0.12.28. Only applications using one of the vector store integrations above are in scope, and the integrations are separate packages with their own versions. Check both:
pip show llama-index
pip list | grep llama-index-vector-storesCompare the integration packages in use with the versions in the fix commit's changelog.
llama-index
- Ecosystem
- PyPI
- Affected
- < 0.12.28
- Fixed in
- 0.12.28
- Check
pip show llama-index
How to fix it
Upgrade llama-index to 0.12.28 or later and update the vector store integration packages you use:
pip install --upgrade "llama-index>=0.12.28"The fix commit bumps ClickHouse to 0.4.1, Couchbase 0.3.1, Deep Lake 0.3.3, Jaguar 0.3.1, Lantern 0.3.1, Nile 0.2.2, OracleDB 0.2.1 and SingleStoreDB 0.3.1. The advisory gives no workaround. Until then, do not pass user-controlled values into table names, filters or raw query strings, and give the application a database account with the least rights.
How to tell if you were hit
Review database logs for statements issued by the application that contain unexpected clauses, such as UNION, stacked statements or comment markers, in queries built by the vector store. Look for unusual reads of tables the RAG feature never touches, or writes and deletes from the vector store's account. Check web logs for input containing quotes and SQL keywords on routes that feed retrieval filters.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Multiple vector store integrations in run-llama/llama_index version v0.12.21 have SQL injection vulnerabilities. These vulnerabilities allow an attacker to read and write data using SQL, potentially leading to unauthorized access to data of other users depending on the usage of the llama-index library in a web application.
Credited to Malayke.
Questions
- Which llama-index version fixes CVE-2025-1793?
0.12.28 per the package data. The advisory says the issue was found in v0.12.21.
- Which vector stores are affected?
The fix changelog lists ClickHouse, Couchbase, Deep Lake, Jaguar, Lantern, Nile, OracleDB and SingleStoreDB. The advisory says multiple integrations, so check all SQL-based stores you use.
- Can it expose other users' data?
Yes, according to the advisory, depending on how the application uses llama-index in a web app.
- Is it exploited in the wild?
No source we read reports it, and it is not in the CISA KEV catalog.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LlamaIndex vulnerabilities
All LlamaIndex entriesCVE-2025-6208
llama-index-core vulnerable to Uncontrolled Resource Consumption
medium5.3Feb 2, 2026CVE-2025-7707
llama-index has Insecure Temporary File
high7.1Oct 13, 2025CVE-2025-7647
llama-index-core insecurely handles temporary files
high7.3Sep 27, 2025CVE-2025-5302
LlamaIndex affected by a Denial of Service (DOS) in JSONReader
high8.6Aug 26, 2025CVE-2025-6211
LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class
medium6.5Jul 10, 2025CVE-2025-3108
LlamaIndex has Incomplete Documentation of Program Execution related to JsonPickleSerializer component
medium5.0Jul 7, 2025
