CVE-2024-6587: Litellm LiteLLM Server-Side Request Forgery (SSRF) Vulnerability
HIGHCVE-2024-6587 is a HIGH (CVSS 7.5) litellm server-side request forgery (ssrf) vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Litellm libraries in the PyPI ecosystem. The issue involves litellm server-side request forgery (ssrf) vulnerability. Remediation is available by upgrading affected packages to version 1.44.8.
CVE-2024-6587 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2024-6587
To remediate this vulnerability, upgrade all affected Litellm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install litellm>=1.44.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show litellm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2024-6587, inspect your installed packages using pip:
pip show litellm
Analyze the terminal output to locate any version of Litellm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.44.8), your application is affected.
Note: The pip show litellm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Litellm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-6587 Affected Litellm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
litellm
|
PyPI |
< 1.44.8
|
1.44.8
|
References
Frequently Asked Questions
What is CVE-2024-6587?
Which Litellm versions are affected?
What version fixes CVE-2024-6587?
Is litellm affected?
What is the CVSS score of CVE-2024-6587?
What CWE is associated with CVE-2024-6587?
How can I check PyPI dependencies for CVE-2024-6587?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g26j-5385-hhw3",
"modified" : "2024-09-13T19:29:08Z",
"published" : "2024-09-13T18:31:47Z",
"aliases" : [ "CVE-2024-6587" ],
"summary" : "LiteLLM Server-Side Request Forgery (SSRF) vulnerability",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "litellm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.44.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6587"
}, {
"type" : "WEB",
"url" : "https://github.com/berriai/litellm/commit/ba1912afd1b19e38d3704bb156adf887f91ae1e0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/berriai/litellm"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/4001e1a2-7b7a-4776-a3ae-e6692ec3d997"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-13T19:29:08Z",
"nvd_published_at" : "2024-09-13T16:15:04Z"
}
}