{"id":"CVE-2024-58339","published":"2026-01-12T23:04:25Z","modified":"2026-07-28T01:47:43Z","title":"LlamaIndex <= 0.12.2 VannaQueryEngine SQL Execution Allows Resource Exhaustion","vendor":"run-llama","product":"llama_index","tier":"tail","description":{"text":"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().","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00649,"percentile":0.52049,"provenance":"source"},"cwes":[{"id":"CWE-770","name":"Allocation of Resources Without Limits or Throttling"}],"references":[{"url":"https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f","tags":["technical-description","exploit"]},{"url":"https://www.llamaindex.ai/","tags":["product"]},{"url":"https://github.com/run-llama/llama_index","tags":["third-party-advisory"]},{"url":"https://www.vulncheck.com/advisories/llamaindex-vannaqueryengine-sql-execution-allows-resource-exhaustion","tags":["third-party-advisory"]}],"priority":{"score":21.5,"factors":[{"name":"EPSS percentile","points":10.41},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"run-llama","affectedVersions":[{"vendor":"run-llama","product":"llama_index","versions":["<= 0.12.2"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-01-13T17:18:23.167508Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"llama-index","vulnerableRanges":["<0.12.3"],"patched":["0.12.3"],"from":["PYSEC-2026-86"],"provenance":"source"}],"summary":{"text":"The LlamaIndex VannaQueryEngine implementation in the llama_index product (run-llama) contains an uncontrolled resource consumption flaw in versions up to and including 0.12.2: the custom_query() function in llama_index/packs/vanna/base.py generates SQL from a user-supplied prompt and runs it via vn.run_sql() without enforcing execution limits. An attacker who can submit prompts to a downstream deployment over the network, with no authentication or user interaction required, can trigger expensive or unbounded SQL operations that exhaust CPU or memory and cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:59:17Z"},"euvd":{"id":"EUVD-2026-2397","exploited":false,"provenance":"source"},"exploitRefs":["https://huntr.com/bounties/a1d6c30d-fce0-412a-bd22-14e0d4c1fa1f"]}