CVE-2024-58339
Published: 12 January 2026
Summary
CVE-2024-58339 is a high-severity Allocation of Resources Without Limits or Throttling (CWE-770) vulnerability in Llamaindex Llamaindex. Its CVSS base score is 7.5 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Application or System Exploitation (T1499.004); ranked at the 30.9th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
This vulnerability is AI-related — categorised as Other AI Platforms.
Threat & Defense at a Glance
Threat & Defense Details
Likely Mitigating ControlsAI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
This control implements explicit throttling on session allocation, addressing the weakness of allocating resources without limits.
Plan testing exercises resource allocation limits and throttling during simulated failures, directly addressing weaknesses that allow unbounded resource use.
Contingency plan updates ensure recovery strategies address unbounded resource allocation, making it harder for attackers to exploit lack of throttling to cause prolonged outages.
Provides continuity when unbounded resource allocation at the primary site leads to exhaustion and downtime.
Alternate services allow operations to continue when primary allocation of resources lacks limits or throttling.
Explicit planning of security-related actions requires defining limits, windows, and resource allocations, making allocation without throttling far less likely.
Measures of performance include tracking allocation behavior and throttling effectiveness, reducing the window for resource exhaustion attacks.
Imposes an inactivity-based limit on network resource allocation, throttling the number of concurrently held connections.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Uncontrolled resource consumption via crafted prompts enables application exhaustion through exploitation of the VannaQueryEngine SQL execution path.
NVD 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…
more
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().
Deeper analysisAI
CVE-2024-58339 is an uncontrolled resource consumption vulnerability (CWE-770) affecting LlamaIndex (run-llama/llama_index) versions up to and including 0.12.2. The issue resides in the VannaPack VannaQueryEngine implementation, specifically within the custom_query() function in llama_index/packs/vanna/base.py. This logic generates SQL statements from user-supplied prompts and executes them via vn.run_sql() without enforcing query execution limits, enabling resource exhaustion.
The vulnerability carries a CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), indicating high severity due to its potential for denial-of-service. Remote attackers require no privileges or user interaction and can exploit it over the network with low complexity. In downstream deployments where untrusted users provide prompts to the VannaQueryEngine, an attacker can supply crafted prompts that generate expensive or unbounded SQL operations, exhausting CPU or memory resources and causing a denial-of-service condition.
Advisories from sources including VulnCheck, Huntr, and the LlamaIndex GitHub repository detail the vulnerability and its exploitation path. Security practitioners should consult these references—such as https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustion and https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f—for guidance on identifying affected deployments and implementing mitigations like input validation or query limits.
This issue is particularly relevant to AI/ML workflows, as LlamaIndex is a framework for building LLM-powered applications, potentially exposing data querying interfaces in production RAG systems to resource exhaustion attacks. No real-world exploitation has been reported in the provided details.
Details
- CWE(s)
Affected Products
AI Security AnalysisAI
- AI Category
- Other AI Platforms
- Risk Domain
- N/A
- OWASP Top 10 for LLMs 2025
- None mapped
- Classification Reason
- Matched keywords: llama