Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2024-58339: CWE-770 Allocation of Resources Without Limits or Throttling in run-llama llama_index

0
High
VulnerabilityCVE-2024-58339cvecve-2024-58339cwe-770
Published: Mon Jan 12 2026 (01/12/2026, 23:04:25 UTC)
Source: CVE Database V5
Vendor/Project: run-llama
Product: 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().

AI-Powered Analysis

AILast updated: 01/12/2026, 23:38:20 UTC

Technical Analysis

CVE-2024-58339 is a resource exhaustion vulnerability classified under CWE-770, found in the run-llama project's llama_index library, specifically in versions up to 0.12.2. The vulnerability exists in the VannaPack VannaQueryEngine's custom_query() method, located in llama_index/packs/vanna/base.py. This method dynamically generates SQL queries based on user-supplied prompts and executes them via vn.run_sql() without imposing any limits or throttling on query complexity or execution time. Because the SQL statements are constructed from untrusted input without safeguards, an attacker can submit prompts that translate into highly expensive or unbounded SQL operations. Such operations can consume excessive CPU cycles and memory, leading to denial-of-service conditions that degrade or halt service availability. The vulnerability is remotely exploitable without authentication or user interaction, increasing its risk profile. The CVSS 4.0 vector (AV:N/AC:L/AT:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) indicates network attack vector, low complexity, no privileges or user interaction required, no confidentiality or integrity impact, but high availability impact. No patches or exploit code are currently publicly available, but the risk remains significant for deployments exposing llama_index to untrusted users. The root cause is the lack of resource consumption controls in the SQL execution path, which should be addressed by introducing query execution limits, input sanitization, and access restrictions.

Potential Impact

For European organizations, the primary impact of CVE-2024-58339 is the risk of denial-of-service attacks that can disrupt critical AI-driven services relying on llama_index. Organizations using this library in customer-facing applications or internal tools that accept user prompts could face service outages, degraded performance, and potential operational downtime. This can affect sectors such as finance, healthcare, research, and public services where AI query engines are increasingly integrated. The absence of confidentiality or integrity impact means data breaches are unlikely, but availability loss can still cause significant business disruption and reputational damage. Additionally, remediation efforts and incident response could incur operational costs. The threat is particularly relevant for organizations deploying AI tooling in multi-tenant or cloud environments where untrusted users have input capabilities. Given the high CVSS score and ease of exploitation, the vulnerability represents a critical operational risk if left unmitigated.

Mitigation Recommendations

To mitigate CVE-2024-58339, organizations should implement the following specific measures: 1) Apply strict input validation and sanitization on user-supplied prompts to prevent generation of excessively complex or unbounded SQL queries. 2) Introduce query execution limits such as maximum execution time, memory usage caps, and result size restrictions within the VannaQueryEngine or the underlying SQL execution environment. 3) Restrict access to the llama_index service to trusted users only, employing authentication and authorization controls to prevent untrusted or anonymous access. 4) Monitor resource usage metrics closely to detect abnormal CPU or memory consumption patterns indicative of exploitation attempts. 5) If possible, isolate the SQL execution environment in sandboxed containers or virtual machines to limit the blast radius of any resource exhaustion. 6) Stay updated with run-llama project releases and apply patches promptly once available. 7) Conduct regular security reviews and penetration testing focusing on injection and resource exhaustion vectors in AI query components. These targeted actions go beyond generic advice by focusing on controlling resource consumption and access in the specific vulnerable component.

Need more detailed analysis?Upgrade to Pro Console

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: 1/12/2026, 11:23:45 PM

Last enriched: 1/12/2026, 11:38:20 PM

Last updated: 1/13/2026, 1:34:34 AM

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats