SQL Injection Affecting llama-index-retrievers-duckdb-retriever package, versions [,0.4.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.2% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-LLAMAINDEXRETRIEVERSDUCKDBRETRIEVER-9680263
  • published10 Apr 2025
  • disclosed20 Mar 2025
  • creditlife-team2024

Introduced: 20 Mar 2025

NewCVE-2024-11958  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade llama-index-retrievers-duckdb-retriever to version 0.4.0 or higher.

Overview

llama-index-retrievers-duckdb-retriever is a llama-index retrievers duckdb-retriever integration

Affected versions of this package are vulnerable to SQL Injection in the _retrieve() function, which sends an unparameterized SQL query based on user input for the values of "search using string" and "calculate a relevance score", to the underlying database.

PoC

life') AS score, node_id, text FROM documents UNION SELECT '1500', '!', concat('life', version()) UNION SELECT concat('0

CVSS Base Scores

version 4.0
version 3.1