CVE-2024-5225 json
SQL Injection in berriai/litellm
published 2024-06-06 2 y ago modified 2026-09-10 1 mo ago also GHSA-h6m6-jj8v-94jj , PYSEC-2026-1550 , EUVD-2024-2064
- cvss
- 6.4
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 37%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- pypi litellm 1.40.0
- github.com/BerriAI/litellm@f75c15d commit
- github.com/BerriAI/litellm#3940 pull request
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.43% chance of exploitation in the next 30 days, higher than 37% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- huntr.com https://huntr.com/bounties/491e4884-0306-4cd4-8fe2-9a19de33bf5c referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 6.4 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
| NVD | 3.1 | 7.2 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.0 | 6.4 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
| OSV | 3.0 | 6.4 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | litellm | <1.40.0 |
1.40.0 |
Affected products
- berriai berriai/litellm
Classification
- Weakness
-
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
References
-
github.com
/BerriAI/litellm/pull/3940
web
-
github.com
/BerriAI/litellm/commit/f75c15d6cd535aa78014378ad532de1df6be2f56
web
-
huntr.com
/bounties/491e4884-0306-4cd4-8fe2-9a19de33bf5c
web, exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-5225
advisory
-
github.com
/BerriAI/litellm
package
-
pypi.org
/project/litellm
package
-
github.com
/advisories/GHSA-h6m6-jj8v-94jj
advisory
Sources
- CVE List CVE-2024-5225
- GitHub Advisory GHSA-h6m6-jj8v-94jj
- NVD CVE-2024-5225
- OSV PYSEC-2026-1550
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.