CVE-2025-1750: LlamaIndex DuckDBVectorStore vulnerable to SQL injection through ref_doc_id

CVE-2025-1750 · Severity: critical · CVSS 9.8 · Published 2025-06-02

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).

Technologies: llama-index (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2025-1750 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-1750 being exploited in the wild.
How severe is CVE-2025-1750?
Critical severity, with a CVSS score of 9.8, published 2 June 2025.
Which products and versions are affected?
llama-index (PyPI) ECOSYSTEM:introduced=0.12.19,fixed=0.12.21; llama-index-vector-stores-duckdb (PyPI) >= 0.12.19, < 0.12.21, ECOSYSTEM:introduced=0.12.19,fixed=0.12.21.
Is there a fix for CVE-2025-1750?
Yes. llama-index (PyPI): upgrade to 0.12.21 or later; llama-index-vector-stores-duckdb (PyPI): upgrade to 0.12.21 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2025-1750?
Check whether you run llama-index (PyPI) or llama-index-vector-stores-duckdb (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 (PyPI): upgrade to 0.12.21 or later
    pip install "llama-index>=0.12.21"
  • llama-index-vector-stores-duckdb (PyPI): upgrade to 0.12.21 or later
    pip install "llama-index-vector-stores-duckdb>=0.12.21"

Affected products

  • llama-index (PyPI) ECOSYSTEM:introduced=0.12.19,fixed=0.12.21
  • llama-index-vector-stores-duckdb (PyPI) >= 0.12.19, < 0.12.21, ECOSYSTEM:introduced=0.12.19,fixed=0.12.21

Identifiers

  • CVE-2025-1750
  • GHSA-6mcc-q3mg-3qg6
  • PYSEC-2025-245
  • PYSEC-2026-4242

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.