Quick answers
- Is CVE-2024-11958 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2024-11958 being exploited in the wild.
- How severe is CVE-2024-11958?
- Critical severity, with a CVSS score of 9.8, published 20 March 2025.
- Which products and versions are affected?
- llama-index-retrievers-duckdb-retriever (PyPI) < 0.4.0, ECOSYSTEM:introduced=0,fixed=0.4.0.
- Is there a fix for CVE-2024-11958?
- Yes. llama-index-retrievers-duckdb-retriever (PyPI): upgrade to 0.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2024-11958 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2024-11958?
- Check whether you run Llamaindex DuckDB Retriever or llama-index-retrievers-duckdb-retriever (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- llama-index-retrievers-duckdb-retriever (PyPI): upgrade to 0.4.0 or later
pip install "llama-index-retrievers-duckdb-retriever>=0.4.0"
Technical details
A SQL injection vulnerability exists in the `duckdb_retriever` component of the `llama-index-retrievers-duckdb-retriever` package. The root cause is the construction of SQL queries using string formatting or concatenation rather than prepared statements with parameterized inputs. An attacker can exploit this by providing malicious input that alters the SQL command structure. In the context of DuckDB, this can be escalated to Remote Code Execution (RCE) by using SQL commands to install the `shellfs` extension and execute arbitrary system commands. The vulnerability is reachable over the network without authentication if the retriever is exposed via an API. This issue was fixed in version 0.4.0 by implementing prepared statements.
Affected products
- LlamaIndex (run-llama) llama-index-retrievers-duckdb-retriever < 0.4.0
Identifiers
- CVE-2024-11958
- GHSA-339r-cjv9-x78g
- PYSEC-2026-399
Timeline
- 2025-03-20: disclosed
- 2025-03-20: advisory
- 2025-03-20: patched: Fixed in version 0.4.0
References
- https://github.com/run-llama/llama_index/commit/35bd221e948e40458052d30c6ef2779bc965b6d0
- https://huntr.com/bounties/8ddf66e1-f74c-4d53-992b-76bc45cacac1
- https://github.com/pypa/advisory-database/tree/main/vulns/llama-index-retrievers-duckdb-retriever/PYSEC-2026-399.yaml
- https://github.com/run-llama/llama_index
- https://pypi.org/project/llama-index-retrievers-duckdb-retriever