---
title: "CVE-2024-23751: SQL injection in llama-index"
url: https://erroneo.us/security/cve/CVE-2024-23751/
description: "CVE-2024-23751 (llama-index (PyPI)): LlamaIndex (aka llamaindex) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine…"
type: vulnerability-record
section: "Security Digest"
date_published: 2024-01-22
date_modified: 2025-06-20
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2024-23751"
kev: false
cvss: 9.8
epss: 0.0066
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2024-23751: SQL injection in llama-index

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.7% , percentile 51: FIRST’s model estimates a 0.7% chance of exploitation activity in the next 30 days, higher than 51% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes llama-index (PyPI) <= 0.9.35, no fixed version listed . Check your lockfile, including transitive dependencies.

## What it is

LlamaIndex (aka llamaindex) through 0.9.34 allows SQL injection via the Text-to-SQL feature in NLSQLTableQueryEngine, SQLTableRetrieverQueryEngine, NLSQLRetriever, RetrieverQueryEngine, and PGVectorSQLQueryEngine. For example, an attacker might be able to delete this year's student records via "Drop the Students table" within English language input.

## Affected packages

- PyPI `llama-index` <= 0.9.35 → fixed: none listed

## Affected products (CVE record)

- n/a n/a: see advisory

## Severity

- CISA-ADP CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact partial .
- FIRST EPSS (model of 2026-10-21): 0.66% probability of exploitation activity in the next 30 days; percentile 51.

## Sources

- [GitHub Advisory GHSA-2jxw-4hm4-6w87](https://github.com/advisories/GHSA-2jxw-4hm4-6w87)
- [CVE.org record CVE-2024-23751](https://www.cve.org/CVERecord?id=CVE-2024-23751)
- [NVD entry CVE-2024-23751](https://nvd.nist.gov/vuln/detail/CVE-2024-23751)
- [github.com](https://github.com/run-llama/llama_index/issues/9957)
- [github.com](https://github.com/pypa/advisory-database/tree/main/vulns/llama-index/PYSEC-2024-12.yaml)

---
Source page: https://erroneo.us/security/cve/CVE-2024-23751/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
