CVE-2024-9606: Litellm LiteLLM Reveals Portion Of API Vulnerability
HIGHCVE-2024-9606 is a HIGH (CVSS 7.5) litellm reveals portion of api vulnerability (CWE-117: Improper Output Neutralization for Logs) affecting Litellm libraries in the PyPI ecosystem. The issue involves litellm reveals portion of api key via a logging file. Remediation is available by upgrading affected packages to version 1.44.12.
CVE-2024-9606 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-9606
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.12
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-9606, 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.12), 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-117: Improper Output Neutralization for Logs, where the product constructs a log message from external input, but it does not neutralize or incorrectly neutralizes special elements when the message is written to a log file. 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-9606 Affected Litellm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
litellm
|
PyPI |
< 1.44.12
|
1.44.12
|
References
Frequently Asked Questions
What is CVE-2024-9606?
Which Litellm versions are affected?
What version fixes CVE-2024-9606?
Is litellm affected?
What is the CVSS score of CVE-2024-9606?
What CWE is associated with CVE-2024-9606?
How can I check PyPI dependencies for CVE-2024-9606?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g5pg-73fc-hjwq",
"modified" : "2025-03-20T21:02:06Z",
"published" : "2025-03-20T12:32:51Z",
"aliases" : [ "CVE-2024-9606" ],
"summary" : "LiteLLM Reveals Portion of API Key via a Logging File",
"details" : "In berriai/litellm before version 1.44.12, the `litellm/litellm_core_utils/litellm_logging.py` file contains a vulnerability where the API key masking code only masks the first 5 characters of the key. This results in the leakage of almost the entire API key in the logs, exposing a significant amount of the secret key. The issue affects version v1.44.9.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "litellm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.44.12"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9606"
}, {
"type" : "WEB",
"url" : "https://github.com/berriai/litellm/commit/9094071c4782183e84f10630e2450be3db55509a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/BerriAI/litellm"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/4a03796f-a8d4-4293-84ef-d3959456223a"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-117" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-20T21:02:06Z",
"nvd_published_at" : "2025-03-20T10:15:49Z"
}
}