CVE-2024-58339: CWE-770 Allocation of Resources Without Limits or Throttling in run-llama llama_index
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().
AI Analysis
Technical Summary
CVE-2024-58339 is a resource exhaustion vulnerability (CWE-770) in the run-llama llama_index project, specifically in the VannaPack VannaQueryEngine's custom_query() function. This function constructs SQL queries from user input and executes them via vn.run_sql() without any throttling or limits on resource usage. In environments where untrusted users can supply prompts, this allows attackers to trigger expensive or unbounded SQL operations that exhaust CPU or memory resources, resulting in denial-of-service. The vulnerability affects versions up to and including 0.12.2.
Potential Impact
An attacker able to supply prompts to the vulnerable llama_index component can cause excessive CPU or memory consumption by triggering unbounded or expensive SQL queries. This leads to denial-of-service conditions, potentially disrupting availability of the affected system or service. No evidence of privilege escalation or data confidentiality/integrity impact is provided.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict access to the vulnerable custom_query() functionality to trusted users only or implement external query execution limits to prevent resource exhaustion.
CVE-2024-58339: CWE-770 Allocation of Resources Without Limits or Throttling in run-llama llama_index
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().
CVSS v4.0
Score 8.7high
Affected software
run-llama
llama_index
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-58339 is a resource exhaustion vulnerability (CWE-770) in the run-llama llama_index project, specifically in the VannaPack VannaQueryEngine's custom_query() function. This function constructs SQL queries from user input and executes them via vn.run_sql() without any throttling or limits on resource usage. In environments where untrusted users can supply prompts, this allows attackers to trigger expensive or unbounded SQL operations that exhaust CPU or memory resources, resulting in denial-of-service. The vulnerability affects versions up to and including 0.12.2.
Potential Impact
An attacker able to supply prompts to the vulnerable llama_index component can cause excessive CPU or memory consumption by triggering unbounded or expensive SQL queries. This leads to denial-of-service conditions, potentially disrupting availability of the affected system or service. No evidence of privilege escalation or data confidentiality/integrity impact is provided.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict access to the vulnerable custom_query() functionality to trusted users only or implement external query execution limits to prevent resource exhaustion.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-01-09T20:28:41.285Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69658281da2266e838450d1c
Added to database: 01/12/2026, 23:23:45 UTC
Last enriched: 07/30/2026, 00:29:57 UTC
Last updated: 09/10/2026, 22:26:35 UTC
Views: 405
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.