| Component | LiteLLM |
| Severity | high (CVSS 7.2) |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| Published (NVD) | 2024-06-06 |
| Last modified | 2026-06-17 |
| Affected versions | < 1.40.0 from the GitHub-reviewed advisory GHSA-h6m6-jj8v-94jj NVD's CPE data says otherwise on some releases, where a more reliable source, or two others together, contradict it |
| Fixed in | 1.40.0 |
| Weakness | CWE-89 |
| CISA KEV | not listed |
NVD description
An SQL Injection vulnerability exists in the berriai/litellm repository, specifically within the /global/spend/logs endpoint. The vulnerability arises due to improper neutralization of special elements used in an SQL command. The affected code constructs an SQL query by concatenating an unvalidated api_key parameter directly into the query, making it susceptible to SQL Injection if the api_key contains malicious data. This issue affects the latest version of the repository. Successful exploitation of this vulnerability could lead to unauthorized access, data manipulation, exposure of confidential information, and denial of service (DoS).
What to do
- Upgrade LiteLLM to
1.40.0or later. - Do not expose the component's API or UI to the internet without authentication in front of it.