LiteLLMPublished 6 Jun 2024NVD status: Modified

CVE-2024-5225

An SQL Injection vulnerability exists in the berriai/litellm repository, specifically within the /global/spend/logs endpoint.

ComponentLiteLLM
Severityhigh (CVSS 7.2)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2024-06-06
Last modified2026-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 in1.40.0
WeaknessCWE-89
CISA KEVnot 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.0 or later.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Read more