Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LlamaIndex

CVE-2024-12704: LlamaIndex Improper Handling of Exceptional Conditions vulnerability

highCVSS 3.0 7.5GHSA-j3wr-m6xh-64hg

A vulnerability in the LangChainLLM class of the run-llama/llamaindex repository, version v0.12.5, allows for a Denial of Service (DoS) attack. The streamcomplete method executes the llm using a thread and retrieves the result via the getresponsegen method of the StreamingGeneratorCallbackHandler class.

Published Mar 20, 2025 · Updated Feb 24, 2026

Affected packages

llama-index-core

Ecosystem
PyPI
Affected
< 0.12.6
Fixed in
0.12.6
Check
pip show llama-index-core

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

A vulnerability in the LangChainLLM class of the run-llama/llama_index repository, version v0.12.5, allows for a Denial of Service (DoS) attack. The stream_complete method executes the llm using a thread and retrieves the result via the get_response_gen method of the StreamingGeneratorCallbackHandler class. If the thread terminates abnormally before the _llm.predict is executed, there is no exception handling for this case, leading to an infinite loop in the get_response_gen function. This can be triggered by providing an input of an incorrect type, causing the thread to terminate and the process to continue running indefinitely.

Credited to fossilet.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More LlamaIndex vulnerabilities

All LlamaIndex entries