CVE-2025-1750: LlamaIndex DuckDBVectorStore SQL Injection Vulnerability

Summary

15/10/2026
Yes i
Critical
9.8

CVE-2025-1750: LlamaIndex DuckDBVectorStore vulnerable to SQL injection through ref_doc_id. Affects llama-index-vector-stores-duckdb versions >= 0.12.19, < 0.12.21. Fixed in 0.12.21. How to fix ↓

Also tracked for

The same CVE-2025-1750 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

LlamaIndex is a package designed for managing and querying vector stores, particularly using DuckDB as a backend. It allows users to efficiently store and retrieve high-dimensional vectors, making it suitable for applications in machine learning and data analysis. However, a critical vulnerability has been identified in the DuckDBVectorStore component, which can be exploited through SQL injection, posing significant risks to data integrity and system security.

Vulnerability Detail

An SQL injection vulnerability exists in the delete function of DuckDBVectorStore in run-llama/llama_index version v0.12.19. This vulnerability allows an attacker to manipulate the ref_doc_id parameter, enabling them to read and write arbitrary files on the server, potentially leading to remote code execution (RCE). The flaw arises from insufficient validation of user input, which can be exploited to execute unauthorized SQL commands.

How To Fix

Latest published version: 0.7.0 as of 22 Oct 2026

pip install --upgrade "llama-index-vector-stores-duckdb==0.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.12.21

This is the first release that contains the fix.

pip install --upgrade "llama-index-vector-stores-duckdb==0.12.21"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement input validation on the ref_doc_id parameter to sanitize user inputs and prevent SQL injection attacks. Ensure that only expected values are processed by the delete function.

Conclusion

The SQL injection vulnerability in LlamaIndex's DuckDBVectorStore poses significant risks to applications utilizing this package. It is crucial to update to the latest version to mitigate potential threats. Additionally, implementing input validation can serve as a temporary measure until an update can be applied.

See every vulnerability recorded for llama-index-vector-stores-duckdb →

Share this vulnerability

FAQ

The vulnerability is an SQL injection flaw that allows attackers to manipulate database queries through the ref_doc_id parameter.

Exploitation of this vulnerability can lead to unauthorized access to sensitive data, data corruption, or even remote code execution on the server.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors open-source vulnerabilities without requiring sign-up.

If an immediate update is not possible, implement input validation as a temporary measure to mitigate the risk of SQL injection.

The CVSS score of this vulnerability is 9.8, indicating a critical level of severity.

How To Fix

Latest published version: 0.7.0 as of 22 Oct 2026

pip install --upgrade "llama-index-vector-stores-duckdb==0.7.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.12.21

This is the first release that contains the fix.

pip install --upgrade "llama-index-vector-stores-duckdb==0.12.21"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback