CVE-2024-5225
SQL Injection in berriai/litellm
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).
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.4
SQL Injection in berriai/litellm
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).
- Record
CVE-2024-5225- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
EUVDEUVD-2024-2064
6.4
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).
- Record
EUVD-2024-2064- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-h6m6-jj8v-94jj
6.4
SQL injection in litellm
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).
- Record
GHSA-h6m6-jj8v-94jj- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
NVD
7.2
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).
- Record
CVE-2024-5225- CVSS 3.1
- 7.2 High
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H - CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
OSV
6.4
SQL Injection in berriai/litellm
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).
- Record
CVE-2024-5225- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVGHSA-h6m6-jj8v-94jj
6.4
SQL injection in litellm
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).
- Record
GHSA-h6m6-jj8v-94jj- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-11-02
OSVPYSEC-2026-1550
6.4
SQL injection in litellm
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).
- Record
PYSEC-2026-1550- CVSS 3.0
- 6.4 Medium
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
litellmPyPI |
before 1.40.0 | 1.40.0 |
litellmPyPI |
before 1.40.0, plus listed versions 0.1.00.1.10.1.20.1.2010.1.202 Show 45 moreShow less0.1.2030.1.2040.1.2050.1.2060.1.2070.1.2080.1.2090.1.2100.1.2110.1.2120.1.2130.1.2140.1.2150.1.2160.1.2170.1.2180.1.2190.1.2200.1.2210.1.2220.1.2230.1.2240.1.2250.1.2260.1.2270.1.2280.1.2290.1.22910.1.2300.1.2310.1.2320.1.2330.1.2340.1.2350.1.2360.1.2370.1.2380.1.30.1.310.1.320.1.3300.1.3310.1.340.1.3410.1.343 |
1.40.0 |
litellmPyPI |
before 1.40.0, plus listed versions 0.1.00.1.10.1.20.1.2010.1.202 Show 45 moreShow less0.1.2030.1.2040.1.2050.1.2060.1.2070.1.2080.1.2090.1.2100.1.2110.1.2120.1.2130.1.2140.1.2150.1.2160.1.2170.1.2180.1.2190.1.2200.1.2210.1.2220.1.2230.1.2240.1.2250.1.2260.1.2270.1.2280.1.2290.1.22910.1.2300.1.2310.1.2320.1.2330.1.2340.1.2350.1.2360.1.2370.1.2380.1.30.1.310.1.320.1.3300.1.3310.1.340.1.3410.1.343 |
1.40.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-5225 is a medium vulnerability (CVSS 6.4) in Berriai Berriai/litellm, published June 6, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in litellm 1.40.0.
References
huntr.com/bounties/491e4884-0306-4cd4-8fe2-9a19de33bf5c
nvd.nist.gov/vuln/detail/CVE-2024-5225
github.com/BerriAI/litellm/pull/3940
github.com/BerriAI/litellm/commit/f75c15d6cd535aa78014378ad532de1df6be2f56
github.com/advisories/GHSA-h6m6-jj8v-94jj
github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5225.json
github.com/BerriAI/litellm
pypi.org/project/litellm
Left out here: 998 versions. The JSON record has them.