CVE-2025-1793
Critical · 9.8llama_index vulnerable to SQL Injection
CVSS
9.8
EPSS
0.7%
Published
Jun 5, 2025
CISA due date
—
Cloudanix analysis
A bug in an AI library can let attackers reach and change private information stored in a database by sending specially crafted requests.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Library
- Class
- SQL Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
SQL injection in multiple vector store integrations permits direct execution of attacker-controlled SQL statements, enabling arbitrary read and write operations against the underlying database.
Why it matters to the business
Attackers can access or modify data belonging to other users, resulting in potential data breaches, compliance violations, and loss of trust in applications built with the affected library.
How an attack unfolds
An attacker supplies malicious input through any vector store integration that is concatenated into SQL queries without parameterization; the injected payload executes directly against the database, allowing data exfiltration or tampering.
How to fix it
Upgrade run-llama/llama_index to commit 0008041e8dde8e519621388e5d6f558bde6ef42e or later; for Ubuntu php-dompdf packages apply the listed ESM or point-release fixes (0.6.1+dfsg-2ubuntu1+esm1, 0.6.2+dfsg-3ubuntu0.20.04.1, 0.6.2+dfsg-3ubuntu0.18.04.1~esm1).
How to confirm the fix worked
Confirm the installed package or Git revision matches or exceeds the fixed commit; retest vector store operations with previously exploitable inputs to verify parameterization or escaping is in place.
Typical attack path
- Identify an application using llama_index vector store integrations with untrusted input
- Craft a payload containing SQL syntax that targets the backend database
- Submit the payload via the affected integration endpoint or API call
- Observe successful execution through data returned or side effects in the database
- Escalate to read/write operations on tables containing other users' data
How to detect it
Inspect application and database logs for unexpected SQL syntax, error messages containing SQL keywords, or queries with unusual string concatenation patterns originating from vector store calls; correlate with timestamps after 2025-06-05.
What your security team should do
- Immediately upgrade all instances of run-llama/llama_index to the fixed commit
- Audit applications for use of vector store integrations and restrict untrusted input until patched
- Review database access controls and logs for any anomalous queries since publication
- Add the vulnerability to internal scanning and dependency-update policies
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | llama-index | 0 | 0.12.28 |
| Chainguard | nemo | 0 | 2.3.1-r2 |
Related vulnerabilities
- CVE-2025-7707 llama-index has Insecure Temporary File Also affects llama-index
- CVE-2025-6211 LlamaIndex vulnerable to data loss through hash collisions in its DocugamiReader class Also affects llama-index
- CVE-2024-12911 LlamaIndex vulnerable to Creation of Temporary File in Directory with Insecure Permissions Also affects llama-index
- CVE-2024-12910 LlamaIndex Uncontrolled Resource Consumption vulnerability Also affects llama-index
- CVE-2024-4181 A command injection vulnerability exists in the RunGptLLM class of the llama_index… Also affects llama-index
- CVE-2024-23751 LlamaIndex (aka llama_index) through 0.9.34 allows SQL injection via the Text-to-SQL… Also affects llama-index
- CVE-2026-32274 Black is the uncompromising Python code formatter. Also affects nemo
- CVE-2026-31826 pypdf is a free and open-source pure-python PDF library. Also affects nemo