CVE-2024-58339
LlamaIndex <= 0.12.2 VannaQueryEngine SQL Execution Allows Resource Exhaustion
- State
- Published
- Severity
- 8.7 High
- Published
- Jan 12, 2026
- Updated
- Jul 28, 2026
- Reserved
- Jan 9, 2026
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().
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 4.0 | 8.7 High | 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 | VulnCheck |
Weaknesses
- CWE-770 Allocation of Resources Without Limits or Throttling
Affected Products
| Product | Versions |
|---|---|
llama_indexrun-llama |
|
References
- https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1ftechnical-descriptionexploit
- https://www.llamaindex.ai/product
- https://github.com/run-llama/llama_indexthird-party-advisory
- https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustionthird-party-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.