Potential SQL Injection in DuckDBRetriever: What You Need to Know
An SQL injection vulnerability has been reported in the DuckDBRetriever component of the run-llama/llama_index repository, affecting versions prior to 0.4.0. This vulnerability could potentially allow remote code execution.
What happened
A SQL injection vulnerability has been identified in the `duckdb_retriever` component of the run-llama/llama_index repository, specifically affecting versions prior to 0.4.0. The vulnerability arises from the construction of SQL queries without using prepared statements, which allows an attacker to inject arbitrary SQL code. This could potentially lead to remote code execution (RCE) by installing the shellfs extension and executing malicious commands.
The vulnerability is under investigation and has been tracked under the ID GHSA-339R-CJV9-X78G. It is recommended to upgrade to version 0.4.0 or later of the `llama-index-retrievers-duckdb-retriever` package to mitigate the risk. Users of the affected component should assess their exposure and apply the recommended upgrade as soon as possible.
For more detailed information, consult the primary source: [GHSA-339r-cjv9-x78g] LlamaIndex Retrievers Integration: DuckDBRetriever SQL Injection (https://github.com/advisories/GHSA-339r-cjv9-x78g).
How 0Day mitigates this
llama-index-retrievers-duckdb-retriever is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.