CVE-2024-6587 is a high-severity (CVSS 7.5) Server-Side Request Forgery (SSRF) vulnerability in litellm. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for litellm — see the affected versions and patch details below.
SSRF in berriai/litellm
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-6587.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
litellmReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | litellm | all versions | 1.44.8pip install --upgrade 'litellm==1.44.8' |
Affected Products
litellmlitellmResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for litellm, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update litellm to 1.44.8 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-6587 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
How to detect CVE-2024-6587
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-6587 -u https://target- Template
- LiteLLM - Server-Side Request Forgery
- Severity
- high
- Impact
- Attackers can exploit SSRF to send requests to arbitrary URLs with OpenAI API keys in the Authorization header, potentially exposing API credentials.
- Remediation
- Update LiteLLM to the latest version that addresses the SSRF vulnerability in the chat/completions endpoint.
Template by ProjectDiscovery nuclei-templates (pdresearch, iamnoooob, rootxharsh), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2024-6587 in your dependencies?
Find it across PyPI, including transitive dependencies.