Vulnerability · Published Jan 12, 2026 · Assigned by VulnCheck
CVE-2024-58339LlamaIndex <= 0.12.2 VannaQueryEngine SQL Execution Allows Resource Exhaustion
High 8.7
In plain English
A high-severity resource allocation without limits in llama_index from run-llama. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 51% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 contain an uncontrolled resource consumption vulnerability in the VannaPack VannaQueryEngine implementation. The custom_query() logic generates SQL statements from a user-supplied prompt and executes them via vn.run_sql() without enforcing query execution limits In downstream deployments where untrusted users can supply prompts, an attacker can trigger expensive or unbounded SQL operations that exhaust CPU or memory resources, resulting in a denial-of-service condition. The vulnerable execution path occurs in llama_index/packs/vanna/base.py within custom_query().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | llama-index | 0.12.3 | PYSEC-2026-86 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| run-llama | llama_index | 0 – through 0.12.2 |
Weakness: CWE-770 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
References
- https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f technical-description, exploit
- https://www.llamaindex.ai/ product
- https://github.com/run-llama/llama_index third-party-advisory
- https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustion third-party-advisory