# CVE-2024-6587: LiteLLM - SSRF

> Live exploitation tracking for CVE-2024-6587 by the CrowdSec Live Exploit Tracker, built from real-world attack data crowdsourced from CrowdSec's global network.

Page: https://tracker.crowdsec.net/cves/CVE-2024-6587

## Key facts

- **Exploitation phase:** Background Noise. Continuous low-level scanning or exploitation attempts are observed, mostly opportunistic and automated.
- **CVSS score:** 7.5
- **Public exploit available:** Yes
- **Affected products:** BerriAI/LiteLLM
- **Weaknesses:** CWE-918 (Server-Side Request Forgery (SSRF))
- **Tags:** ai_mcp

## Description

A Server-Side Request Forgery (SSRF) vulnerability exists in BerriAI/LiteLLM version 1.38.10. This vulnerability allows users to specify the `api_base` parameter when making requests to `POST /chat/completions`, causing the application to send the request to the domain specified by `api_base`. This request includes the OpenAI API key. A malicious user can set the `api_base` to their own domain and intercept the OpenAI API key, leading to unauthorized access and potential misuse of the API key.

## CrowdSec analysis

[CVE-2024-6587](https://euvd.enisa.europa.eu/vulnerability/CVE-2024-6587) is a Server-Side Request Forgery (SSRF) vulnerability in the BerriAI/LiteLLM library, allowing attackers to influence request destinations and potentially intercept sensitive API keys through crafted payloads.

CrowdSec has been tracking this vulnerability and its exploits since 9th of October 2024.

According to CrowdSec data, while opportunistic exploitation dominates, a portion of threat actors trying to exploit CVE-2024-6587 apply basic targeting methods such as port or service detection. This indicates emerging patterns of selective targeting.
Additionally, according to week-over-week analysis by CrowdSec, exploitation of CVE-2024-6587 is surging. Attack volumes are spiking well above historical norms, indicating widespread and escalating interest from threat actors. CVE-2024-6587 is currently experiencing high visibility and active exploitation across the internet.

Observed exploitation attempts are characterized by requests made to URLs containing `/chat/completions`.

## Timeline

- 2024-09-13: CVE Published. CVE-2024-6587 is published to NVD.
- 2024-10-09: Rule Released. CrowdSec releases a rule to detect CVE-2024-6587 exploitation attempts against the CrowdSec Network.
- 2024-11-23: CrowdSec First Seen. CrowdSec observes in-the-wild exploitation of CVE-2024-6587 for the first time.

## References

- https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997
- https://github.com/BerriAI/LiteLLM/commit/ba1912afd1b19e38d3704bb156adf887f91ae1e0
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-6587.yaml

## Live exploitation data

The [Live Exploit Tracker page](https://tracker.crowdsec.net/cves/CVE-2024-6587) follows observed exploitation activity for CVE-2024-6587. [Request an API key](https://tracker.crowdsec.net/request-api-key) for full access to its exploitation timeline, attacking IP addresses and blocklists.
