LiteLLM did not check that the allowed_routes field on a new API key was within the creating user's own permissions. An authenticated internal_user could create a key with access to admin-only routes and then use it to reach those routes, escalating to proxy_admin.
A user with the 'internal_user_viewer' role receives an API key that grants access to admin-only endpoints such as '/users/list' and '/users/get_users'. This allows any such account to escalate privileges to PROXY ADMIN.
The logging code in LiteLLM only masked the first five characters of an API key, so almost the whole secret was written to log files. Anyone able to read those logs could recover the key and use it to access the upstream model provider.
A denial-of-service flaw in LiteLLM v1.44.5 allows an unauthenticated attacker to append extra characters to a multipart boundary in an HTTP request, causing the server to process each character and exhaust resources, making the service unavailable.
The post_call_rules configuration in LiteLLM allowed a callback function to be set to a system method such as os.system, which would then be executed when a chat response was processed. An attacker could therefore run arbitrary commands on the server.
The LiteLLM server uses ast.literal_eval to parse user-supplied input, which is unsafe and can be exploited to cause a denial of service. An unauthenticated attacker could crash the Python server.
The LiteLLM server accepted a user-supplied api_base parameter on chat completion requests and forwarded the request, including the OpenAI API key, to that domain. A malicious user could point api_base at their own server and capture the API key.
The add_deployment function decodes and decrypts environment variables from base64 and assigns them to os.environ, and an attacker can send a malicious payload to the /config/update endpoint that is later executed when get_secret is triggered. This allows remote code execution if the server uses Google KMS and a database to store a model.
The team management endpoints in litellm lacked proper access control checks, allowing an attacker to perform any team management action without authorisation. This includes creating, updating, viewing, deleting, blocking, and unblocking teams, as well as adding or removing members.
The `/global/spend/logs` endpoint in litellm builds an SQL query by concatenating an unvalidated `api_key` parameter, allowing SQL injection. An attacker could exploit this to gain unauthorised access, manipulate data, expose confidential information, or cause denial of service.
The '/team/update' endpoint in litellm builds a raw SQL query for deleting users without properly handling the 'user_id' parameter, allowing blind SQL injection. An attacker could use this to read sensitive data such as API keys, user information and tokens from the database.
The `/audio/transcriptions` endpoint in litellm deletes a file named by the request without validating the path. An attacker could delete arbitrary files on the server, such as SSH keys, databases, or configuration files.
The litellm.get_secret() method passes untrusted data to the eval function without sanitisation when Google KMS is used. An attacker could inject malicious values into environment variables via the /config/update endpoint, potentially leading to remote code execution.
The hf_chat_template method in LiteLLM processes the chat_template parameter from tokenizer_config.json through Jinja without sanitisation. An attacker who can supply a malicious tokenizer_config.json could execute arbitrary code on the server.
BL
BerriAI/litellm
Critical
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.