Skip to content
MediumVulnerabilityLLM-specific

CVE-2024-12704: LangChainLLM denial of service through infinite loop in stream_complete

Identifier
CVE-2024-12704
Published
Record updated
View JSON
Affected
  • llama-index-core < 0.12.6
Fixed in
0.12.6
  • released December 17, 2024, 93 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.8%

Summary

CVE-2024-12704 affects the LangChainLLM class in the run-llama/llama_index repository, version v0.12.5. The stream_complete method runs the llm in a thread and reads the result through get_response_gen of StreamingGeneratorCallbackHandler. If the thread terminates abnormally before _llm.predict executes, get_response_gen enters an infinite loop because no exception handling covers this case. Providing an input of an incorrect type triggers this, enabling a Denial of Service (DoS) attack.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.