PatchSiren cyber security CVE debrief
CVE-2024-58339 run-llama CVE debrief
CVE-2024-58339 is an uncontrolled resource consumption vulnerability in LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2. The VannaPack VannaQueryEngine implementation allows an attacker to trigger expensive or unbounded SQL operations via the custom_query() logic, leading to a denial-of-service condition. This issue occurs in llama_index/packs/vanna/base.py within custom_query(). Affected users should be aware of this vulnerability and take steps to mitigate it, especially in downstream deployments where untrusted users can supply prompts.
- Vendor
- run-llama
- Product
- llama_index
- CVSS
- HIGH 8.7
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-01-12
- Original CVE updated
- 2026-07-14
- Advisory published
- 2026-01-12
- Advisory updated
- 2026-07-14
Who should care
Users of LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 should be aware of this vulnerability and take steps to mitigate it, especially in downstream deployments where untrusted users can supply prompts. Operators, platform administrators, vulnerability management teams, and security teams should review their deployments and implement necessary controls.
Technical summary
The custom_query() logic in LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2 generates SQL statements from user-supplied prompts and executes them via vn.run_sql() without enforcing query execution limits. This allows an attacker to trigger expensive or unbounded SQL operations that exhaust CPU or memory resources, resulting in a denial-of-service condition. The vulnerability is located in llama_index/packs/vanna/base.py within custom_query(). Affected deployments should prioritize updates and implement query execution limits.
Defensive priority
High priority should be given to updating LlamaIndex (run-llama/llama_index) to a version beyond 0.12.2 to prevent exploitation of this uncontrolled resource consumption vulnerability. Additionally, implementing query execution limits and monitoring for suspicious SQL operations are crucial defensive measures.
Recommended defensive actions
- Update LlamaIndex (run-llama/llama_index) to a version beyond 0.12.2.
- Implement query execution limits in downstream deployments.
- Monitor for suspicious SQL operations in LlamaIndex deployments.
- Restrict user input to prevent supplying malicious prompts.
- Review compensating controls for exposed systems while remediation is scheduled and verified.
- Check relevant monitoring, detection, and logs for exposed assets that need extra review.
- Track exceptions, retest remediated assets, and close the item only after evidence is documented.
Evidence notes
The CVE record was published on 2026-01-12T23:15:51.630Z and was last modified on 2026-07-14T23:17:18.020Z. The NVD entry is currently Analyzed. This vulnerability affects LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2. The VannaPack VannaQueryEngine implementation allows an attacker to trigger expensive or unbounded SQL operations via the custom_query() logic, leading to a denial-of-service condition. The vulnerable execution path occurs in llama_index/packs/vanna/base.py within custom_query(). Users should verify their deployments and review official advisories for mitigation strategies.
Sources and references
Verified primary and authoritative sources
-
CVE-2024-58339 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2024-58339
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2024-58339 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2024-58339
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Source reference
Unverified legacy reference
URL: https://github.com/run-llama/llama_index
[email protected] - Product
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f
[email protected] - Exploit, Third Party Advisory
-
Source reference
Unverified legacy reference
URL: https://www.llamaindex.ai/
[email protected] - Product
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustion
[email protected] - Third Party Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.