NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · LiteLLM

CVE-2024-4890: SQL injection in litellm

mediumCVSS 3.0 4.9GHSA-8j42-pcfm-3467

The LiteLLM proxy has a blind SQL injection in `/team/update`. The `user_id` parameter goes into a raw SQL delete query without escaping, so an admin-level caller can read API keys, user data and tokens from the database. The advisory lists no patched version for litellm 1.27.14 and earlier.

Published Jun 6, 2024 · Analysis Nov 2, 2026

What an attacker can do

In the /team/update flow, user_id is placed straight into a raw SQL query that deletes users. An attacker can add SQL to it. The injection is blind, so the attacker infers data from true or false responses rather than seeing rows.

The database behind the LiteLLM proxy holds virtual API keys, user records and tokens. Extracting them gives access to upstream model provider spend and to other tenants' keys. The CVSS 3.0 vector says network, low complexity, high privileges (PR:H) and high confidentiality impact only.

Because a high-privilege key is needed, the main risks are a compromised admin key or a delegated team admin role being abused.

Who is affected

pip package litellm 1.27.14 and earlier, with the proxy running against a database. The advisory lists no patched version.

pip show litellm

litellm

Ecosystem
PyPI
Affected
<= 1.27.14
Fixed in
No patched version yet
Check
pip show litellm

How to fix it

The advisory data has no patched version. The fix PR (BerriAI/litellm 2954, titled as a low-severity fix that uses parameterized values for team update) shows as closed, not merged, so it does not prove a fix. Check the current litellm release notes and the code of your version before assuming you are safe.

Until then, restrict access to /team/update and the proxy admin interface to trusted networks and keys. Rotate the master key and virtual keys if you suspect abuse. Upgrading to a recent litellm release is sensible, but no source here confirms this endpoint is fixed.

How to tell if you were hit

In proxy logs, look for /team/update requests whose user_id contains quotes, ;, --, SELECT, UNION or pg_sleep. Watch for slow responses on that endpoint, which signal time-based blind injection. In the database, check for unexpected queries or deleted users.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A blind SQL injection vulnerability exists in the berriai/litellm application, specifically within the '/team/update' process. The vulnerability arises due to the improper handling of the 'user_id' parameter in the raw SQL query used for deleting users. An attacker can exploit this vulnerability by injecting malicious SQL commands through the 'user_id' parameter, leading to potential unauthorized access to sensitive information such as API keys, user information, and tokens stored in the database. The affected version is 1.27.14.

Questions

Is there a patched version of litellm for CVE-2024-4890?

The advisory lists none. It marks everything up to 1.27.14 as vulnerable and gives no fixed version. The linked fix PR was closed without a visible merge.

What can an attacker get?

Data from the proxy database, such as API keys, user information and tokens. The injection is blind and the confidentiality impact is high.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More LiteLLM vulnerabilities

All LiteLLM entries