DuckDB SQL Injection Vulnerability in run-llama/llama_index Allowing Remote Code Execution
Vulnerability
A SQL injection vulnerability has been identified in the delete function of the DuckDBVectorStore component within run-llama/llama_index version 0.12.19. This vulnerability allows attackers to manipulate the ref_doc_id parameter, creating the potential to read and write arbitrary files on the server. Such actions could lead to remote code execution.
Impact
Exploitation of this vulnerability could allow attackers to execute arbitrary code on the server.
Reproduction
The vulnerability can be reproduced by sending a POST request to the '/delete' endpoint with a payload that includes a crafted ref_doc_id parameter. This payload can be designed to exploit the SQL injection vulnerability by, for example, injecting SQL commands that read or write files on the server.
Remediation
Users can update to run-llama/llama_index version 0.12.21 or later, where this vulnerability has been fixed.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
