CVE-2024-58339
Uncontrolled Resource Consumption in LlamaIndex VannaQueryEngine Causes DoS
Publication date: 2026-01-12
Last updated on: 2026-01-12
Assigner: VulnCheck
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| run-llama | llama_index | to 0.12.2 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-770 | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2024-58339 is a vulnerability in LlamaIndex versions up to 0.12.2 where the VannaPack VannaQueryEngine's custom_query() function generates and executes SQL statements from user-supplied prompts without enforcing any limits on query execution. This allows attackers to create expensive or unbounded SQL operations that consume excessive CPU or memory resources, potentially causing the system to become unresponsive or crash due to resource exhaustion. [3]
How can this vulnerability impact me? :
This vulnerability can lead to a denial-of-service (DoS) condition by allowing attackers to exhaust CPU or memory resources through unbounded or expensive SQL queries. In environments where untrusted users can supply prompts, an attacker could exploit this to disrupt service availability, degrade performance, or cause system crashes. [3]
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, you should upgrade LlamaIndex to a version later than 0.12.2 where the uncontrolled resource consumption issue in the VannaPack VannaQueryEngine implementation is fixed. Additionally, restrict or validate user-supplied prompts to prevent untrusted users from executing arbitrary or expensive SQL queries via the custom_query() function. Implement monitoring and resource limits on SQL query execution if possible to prevent denial-of-service conditions. [3]