# CVE-2024-11958: SQL Injection in run-llama/llama_index

- Severity: Critical 9.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.43%, higher than 73% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:10:46.492Z
- Modified: 2026-07-21T15:15:51.607Z
- Also known as: GHSA-339r-cjv9-x78g, PYSEC-2026-399
- Weaknesses: CWE-89
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: @huntr_ai

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

(As written by CVE List.)

## Affected

- run-llama run-llama/llama_index: from unspecified before 0.4.0
- llama-index-retrievers-duckdb-retriever (PyPI): before 0.4.0
- llamaindex llamaindex: before 0.4.0

## Every score

- @huntr_ai: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/8ddf66e1-f74c-4d53-992b-76bc45cacac1> (exploit, third-party-advisory, web)
- <https://github.com/run-llama/llama_index/commit/35bd221e948e40458052d30c6ef2779bc965b6d0> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-11958> (advisory)
- <https://github.com/advisories/GHSA-339r-cjv9-x78g> (advisory)
- <https://github.com/pypa/advisory-database/tree/main/vulns/llama-index-retrievers-duckdb-retriever/PYSEC-2026-399.yaml> (web)
- <https://github.com/run-llama/llama_index> (package)
- <https://pypi.org/project/llama-index-retrievers-duckdb-retriever> (package, web)

## Sources

- CVE List: [CVE-2024-11958](https://www.cve.org/CVERecord?id=CVE-2024-11958), CVE Terms of Use, modified 2025-03-20
- GitHub Advisory Database: [GHSA-339r-cjv9-x78g](https://github.com/advisories/GHSA-339r-cjv9-x78g), CC-BY-4.0, modified 2026-07-21
- NVD: [CVE-2024-11958](https://nvd.nist.gov/vuln/detail/CVE-2024-11958), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-399](https://osv.dev/vulnerability/PYSEC-2026-399), CC-BY-4.0, modified 2026-07-01

---

Page: https://cve.day/CVE-2024-11958 · Whole record: https://cve.day/CVE-2024-11958.json · Rebuilt by cve.day 2026-11-25T22:58:52.352Z
