CVE-2024-12704
Python vulnerability analysis and mitigation

Overview

A vulnerability has been identified in the LangChainLLM class of the run-llama/llamaindex repository, version v0.12.5. The vulnerability, tracked as CVE-2024-12704, allows for a Denial of Service (DoS) attack through the streamcomplete method. The issue was disclosed on March 20, 2025 (NVD).

Technical details

The vulnerability exists in the streamcomplete method which executes the llm using a thread and retrieves the result via the getresponsegen method of the StreamingGeneratorCallbackHandler class. When 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 getresponsegen function. The vulnerability has been assigned a CVSS v3.0 base score of 7.5 (HIGH) with the vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD, Huntr).

Impact

The vulnerability can result in a Denial of Service condition when triggered by providing an input of an incorrect type, causing the thread to terminate and the process to continue running indefinitely (NVD).

Mitigation and workarounds

A fix has been implemented by adding a timeout parameter to the langchain callback handler, as evidenced in the commit d1ecfb77578d089cbe66728f18f635c09aa32a05. The fix includes a timeout mechanism in the getresponsegen method with a default timeout of 120 seconds (Github Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-67511CRITICAL9.6
  • PythonPython
  • cai-framework
NoNoDec 11, 2025
CVE-2025-13780CRITICAL9.1
  • PythonPython
  • cpe:2.3:a:pgadmin:pgadmin
NoYesDec 11, 2025
CVE-2025-67644HIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesDec 11, 2025
CVE-2025-67720MEDIUM6.5
  • PythonPython
  • pyrofork
NoYesDec 11, 2025
CVE-2025-67485MEDIUM5.3
  • PythonPython
  • mad-proxy
NoNoDec 10, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management