CVE-2024-5225: SQL Injection in berriai/litellm

Published Jun 6, 2024
·
Updated

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 apikey parameter directly into the query, making it susceptible to SQL Injection if the apikey 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).

Affected Software

2 affected componentsFixes available
pip/litellm<1.40.0
1.40.0
LiteLLM LiteLLM<=1.40.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/litellm to a version that resolves this vulnerability.

    Fixed in 1.40.0

Event History

Jun 6, 2024
CVE Published
via MITRE·06:19 PM
Data Sourced
via MITRE·06:19 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
Affected Software
Advisory Published
via GitHub·09:30 PM

Frequently Asked Questions

1

What is the severity of CVE-2024-5225?

CVE-2024-5225 is classified as a high severity vulnerability due to its potential for exploitation through SQL injection.

2

How do I fix CVE-2024-5225?

To fix CVE-2024-5225, update the litellm package to version 1.40.2 or later, which includes necessary security patches.

3

Who is affected by CVE-2024-5225?

CVE-2024-5225 affects users of the litellm package versions prior to 1.40.2 when using the /global/spend/logs endpoint.

4

What kind of attack does CVE-2024-5225 allow?

CVE-2024-5225 allows attackers to execute arbitrary SQL commands via crafted input, leading to unauthorized data access.

5

Is CVE-2024-5225 still exploitable?

CVE-2024-5225 is exploitable in versions of the litellm package below 1.40.2 until they are patched or updated.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203