CVE-2024-12704 Details
Description
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.
A denial-of-service vulnerability has been identified in the LangChainLLM class of the run-llama/llama_index repository, version v0.12.5. The issue arises in the stream_complete method, which executes a language model (LLM) using a separate thread and retrieves the result through the get_response_gen method of the StreamingGeneratorCallbackHandler class. If the thread unexpectedly terminates before the LLM's predict method is called, there is no exception handling to address this, causing an infinite loop in the get_response_gen function. This situation can be triggered by sending an input of an incorrect type, leading the thread to crash while the process remains stuck in the loop.
Users are advised to update to LangChainLLM version 0.12.6, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 20, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/run-llama/llama_index/commit/d1ecfb77578d089cbe66728f18f635c09aa32a05 | [email protected] | Patch |
| https://huntr.com/bounties/a0b638fd-21c6-4ba7-b381-6ab98472a02a | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-835 | Loop with Unreachable Exit Condition ('Infinite Loop') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| llamaindex llamaindex | 0.12.5 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 15, 2025 | CVE Modified | [email protected] |
| Jul 31, 2025 | Initial Analysis | [email protected] |
| Mar 20, 2025 | New CVE Received | [email protected] |