Skip to main content
CVE-2024-12704VulnerabilityPublished Updated

CVE-2024-12704: run-llama/llama_index · Loop with Unreachable Exit Condition

Affects run-llama/llama_indexSource CVE Database V5

0

Not known to be exploited · CVSS 7.5 High.

Data as of 26 Oct 2026, 06:26 UTC

CVSS 3.0 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.8% chance of exploitation in 30 days – higher than 57% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Mar 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.

What to do

Affected software

ProductAffectedFixed in
GitHubrun-llama/llama_indexpkg:github/run-llama/llama_indexOther threatsAffected
  • =0.12.5
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

To mitigate this vulnerability, organizations should implement strict input validation to ensure only correctly typed inputs are passed to the LangChainLLM class, preventing thread failures triggered by malformed inputs. Developers should enhance the run-llama/llama_index codebase by adding robust exception handling around the thread execution and the get_response_gen method to detect and gracefully handle abnormal thread termination, thereby avoiding infinite loops. Monitoring and alerting on abnormal CPU or thread usage in systems running this software can provide early detection of exploitation attempts. Until an official patch is released, consider isolating the affected components within containerized or sandboxed environments to limit resource impact. Additionally, applying runtime protections such as watchdog timers or process supervisors can help terminate hung processes automatically. Engage with the vendor or open-source maintainers to track patch availability and apply updates promptly once released. Finally, conduct security testing and fuzzing on inputs to identify and remediate similar issues proactively.

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.

References

Community reviews

Loading reviews…