CVE-2024-58339 Details
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().
A denial-of-service vulnerability has been identified in LlamaIndex versions through 0.12.2, specifically within the VannaPack's VannaQueryEngine. The issue arises because the custom_query() function generates SQL queries from user-provided prompts and executes them without any restrictions on query execution. In environments where untrusted users can input prompts, this flaw can be exploited to initiate costly or unlimited SQL operations that drain CPU or memory resources, leading to service interruptions. The vulnerability is located in the file llama_index/packs/vanna/base.py, within the custom_query() function.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 13, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/run-llama/llama_index | [email protected] | Product |
| https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f | [email protected] | ExploitThird Party Advisory |
| https://www.llamaindex.ai/ | [email protected] | Product |
| https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustion | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-770 | Allocation of Resources Without Limits or Throttling | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| llamaindex llamaindex | <= 0.12.2 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 21, 2026 | Initial Analysis | [email protected] |
| Jan 12, 2026 | New CVE Received | [email protected] |