9.8critical
SQL Injection in run-llama/llama_index
- Severity
- 9.8critical CVSS:3.0 by @huntr_ai
- Exploit likelihood
- 1.43% (higher than 73% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- @huntr_ai
- Also known as
- GHSA-339r-cjv9-x78gPYSEC-2026-399
Description
A SQL injection vulnerability exists in the `duckdb_retriever` component of the run-llama/llama_index repository, specifically in the latest version. The vulnerability arises from the construction of SQL queries without using prepared statements, allowing an attacker to inject arbitrary SQL code. This can lead to remote code execution (RCE) by installing the shellfs extension and executing malicious commands.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| run-llama run-llama/llama_index | from unspecified before 0.4.0 | CVE List |
| llama-index-retrievers-duckdb-retriever (PyPI) | before 0.4.0 | GitHub Advisory Database, PyPA Advisory Database |
| llamaindex llamaindex | before 0.4.0 | NVD |
All scores
| @huntr_ai | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.
What each source says
CVE List
A SQL injection vulnerability exists in the `duckdb_retriever` component of the run-llama/llama_index repository, specifically in the latest version. The vulnerability arises from the construction of SQL queries without using prepared statements, allowing an attacker to inject arbitrary SQL code. This can lead to remote code execution (RCE) by installing the shellfs extension and executing malicious commands.
GitHub Advisory Database
A SQL injection vulnerability exists in the duckdb_retriever component of the run-llama/llama_index repository, specifically in llama-index-retrievers-duckdb-retriever prior to v0.4.0. The vulnerability arises from the construction of SQL queries without using prepared statements, allowing an attacker to inject arbitrary SQL code. This can lead to remote code execution (RCE) by installing the shellfs extension and executing malicious commands.
NVD (es)
Existe una vulnerabilidad de inyección SQL en el componente `duckdb_retriever` del repositorio run-llama/llama_index, concretamente en la última versión. Esta vulnerabilidad surge de la construcción de consultas SQL sin usar sentencias preparadas, lo que permite a un atacante inyectar código SQL arbitrario. Esto puede provocar la ejecución remota de código (RCE) al instalar la extensión shellfs y ejecutar comandos maliciosos.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-11958 changed 2025-03-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-339r-cjv9-x78g changed 2026-07-21 | CC-BY-4.0 |
| NVD | CVE-2024-11958 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-399 changed 2026-07-01 | CC-BY-4.0 |