SSRF in berriai/litellm
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
LiteLLM 1.38.10 SSRF allows attackers to steal OpenAI API keys by setting the api_base parameter to a malicious domain.
Vulnerability
A Server-Side Request Forgery (SSRF) vulnerability exists in LiteLLM version 1.38.10 [2]. The application does not validate the api_base parameter in requests to POST /chat/completions, allowing an attacker to specify an arbitrary domain. This causes the server to send a request to that domain, including the OpenAI API key in the request.
Exploitation
An attacker can set the api_base parameter to their own controlled domain. When a legitimate request is made, the OpenAI API key is forwarded to the attacker's server, allowing interception of the key [2][4]. No authentication is required beyond normal API access.
Impact
With the stolen API key, an attacker gains unauthorized access to the victim's OpenAI account, enabling misuse of API resources and potentially incurring costs or accessing sensitive data [2].
Mitigation
The vulnerability was fixed in commit ba1912a on the LiteLLM repository [3]. The fix adds a check is_request_body_safe that blocks the api_base and base_url parameters in request bodies. Users should update to a patched version or apply the commit to their deployment.
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
litellmPyPI | < 1.44.8 | 1.44.8 |
Affected products
2- berriai/berriai/litellmv5Range: unspecified
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4News mentions
0No linked articles in our index yet.