Litellm Litellm

Don't miss out!

Thousands of developers use stack.watch to stay informed.
Get an email whenever new security vulnerabilities are reported in Litellm.

By the Year

In 2026 there have been 10 vulnerabilities in Litellm with an average score of 6.1 out of ten. Last year, in 2025 Litellm had 6 security vulnerabilities published. That is, 4 more vulnerabilities have already been reported in 2026 as compared to last year. Last year, the average CVE base score was greater by 0.37

Year Vulnerabilities Average Score
2026 10 6.08
2025 6 6.45
2024 8 6.98

It may take a day or so for new Litellm vulnerabilities to show up in the stats or in the list of recent security vulnerabilities. Additionally vulnerabilities may be tagged under a different product or component name.

Recent Litellm Security Vulnerabilities

BerriAI litellm Improper Auth in ui_view_users (<=1.82.2)
CVE-2026-12799 4.3 - Medium - June 21, 2026

A security vulnerability has been detected in BerriAI litellm up to 1.82.2. Affected by this issue is the function ui_view_users of the file litellm/proxy/management_endpoints/internal_user_endpoints.py of the component Incomplete Fix CVE-2025-0628. Such manipulation leads to improper authorization. It is possible to launch the attack remotely. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure.

AuthZ

SSRF in BerriAI litellm 1.82.2 load_openapi_spec_async
CVE-2026-12798 6.3 - Medium - June 21, 2026

A weakness has been identified in BerriAI litellm up to 1.82.2. Affected by this vulnerability is the function load_openapi_spec_async of the file litellm/proxy/_experimental/mcp_server/openapi_to_mcp_generator.py of the component MCP OpenAPI Spec Loader. This manipulation of the argument spec_path causes server-side request forgery. It is possible to initiate the attack remotely. The exploit has been made available to the public and could be used for attacks. The vendor was contacted early about this disclosure.

SSRF

BerriAI litellm <=1.82.5 Completions Interface Auth Bypass via async_pre_call_hook
CVE-2026-12797 6.3 - Medium - June 21, 2026

A security flaw has been discovered in BerriAI litellm up to 1.82.5. Affected is the function async_pre_call_hook of the file enterprise/enterprise_hooks/banned_keywords.py of the component Completions Interface. The manipulation of the argument prompt results in incorrect authorization. The attack may be performed from remote. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure.

AuthZ

BerriAI litellm: Remote Session Expiration in SSO Auth Flow <=1.82.2
CVE-2026-12796 6.3 - Medium - June 21, 2026

A vulnerability was identified in BerriAI litellm up to 1.82.2. This impacts the function get_redirect_response_from_openid of the file litellm/proxy/management_endpoints/ui_sso.py of the component SSO Authentication Flow. The manipulation leads to session expiration. The attack is possible to be carried out remotely. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure.

Insufficient Session Expiration

BerriAI litellm <=1.82.2 SSO Debug Flow JSON.dumps Auth Bypass
CVE-2026-12795 7.3 - High - June 21, 2026

A vulnerability was determined in BerriAI litellm up to 1.82.2. This affects the function json.dumps of the file litellm/proxy/management_endpoints/ui_sso.py of the component SSO Debug Flow. Executing a manipulation can lead to missing authentication. The attack can be executed remotely. The exploit has been publicly disclosed and may be utilized. The vendor was contacted early about this disclosure.

Missing Authentication for Critical Function

SSRF in BerriAI litellm MCP Server before 1.82.2
CVE-2026-12774 6.3 - Medium - June 21, 2026

A security vulnerability has been detected in BerriAI litellm up to 1.82.2. Affected by this vulnerability is the function _execute_with_mcp_client of the file litellm/proxy/_experimental/mcp_server/rest_endpoints.py of the component MCP Server Connection Testing. The manipulation leads to server-side request forgery. Remote exploitation of the attack is possible. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure.

SSRF

BerriAI litellm <=1.59.8 MCP Proxy auth flaw (UserAPIKeyAuth)
CVE-2026-12773 7.3 - High - June 21, 2026

A weakness has been identified in BerriAI litellm up to 1.59.8. Affected is the function UserAPIKeyAuth of the file litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py of the component MCP Proxy. Executing a manipulation can lead to improper authentication. The attack may be launched remotely. The exploit has been made available to the public and could be used for attacks. The vendor was contacted early about this disclosure.

authentification

BerriAI litellm <=1.82.2 PROXY_ADMIN Auth Bypass
CVE-2026-12772 6.3 - Medium - June 21, 2026

A security flaw has been discovered in BerriAI litellm up to 1.82.2. This impacts the function authenticate_user of the file litellm/proxy/auth/login_utils.py of the component PROXY_ADMIN database API Key Generator. Performing a manipulation results in session expiration. The attack may be initiated remotely. The exploit has been released to the public and may be used for attacks. The vendor was contacted early about this disclosure.

Insufficient Session Expiration

Litellm 1.82.2 M2M JWT Improper Auth Remote Vulnerability
CVE-2026-12771 5 - Medium - June 21, 2026

A vulnerability was identified in BerriAI litellm up to 1.82.2. This affects an unknown function of the file litellm/proxy/auth/user_api_key_auth.py of the component M2M JWT Handler. Such manipulation leads to improper authorization. The attack can be launched remotely. A high complexity level is associated with this attack. The exploitability is reported as difficult. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure.

AuthZ

BerriAI litellm 1.63.1 Admin Key Handler Improper Authorization Vulnerability
CVE-2026-12770 5.4 - Medium - June 21, 2026

A vulnerability was determined in BerriAI litellm up to 1.63.1. The impacted element is an unknown function of the file litellm/proxy/management_endpoints/key_management_endpoints.py of the component Admin Key Handler. This manipulation causes improper authorization. The attack can be initiated remotely. The exploit has been publicly disclosed and may be utilized. Patch name: 23781. It is recommended to apply a patch to fix this issue. The vendor was contacted early about this disclosure.

AuthZ

LiteLLM API_KEY Info Disclosure via Health Endpoint
CVE-2025-11203 - October 29, 2025

LiteLLM Information health API_KEY Information Disclosure Vulnerability. This vulnerability allows remote attackers to disclose sensitive information on affected installations of LiteLLM. Authentication is required to exploit this vulnerability. The specific flaw exists within the handling of the API_KEY parameter provided to the health endpoint. The issue results from exposing sensitive information to an unauthorized actor. An attacker can leverage this vulnerability to disclose stored credentials, leading to further compromise. Was ZDI-CAN-26585.

Information Disclosure

SQL Injection via /key/block in BerriAI litellm v1.65.4
CVE-2025-45809 5.4 - Medium - July 03, 2025

SQL Injection vulnerability in BerriAI LiteLLM before 1.81.0 allows attackers to execute arbitrary commands via the key parameter to the "/key/block" and "/key/unblock" API endpoints.

SQL Injection

Langfuse API Key Leakage via proxy_server.py in litellm v1.52.1
CVE-2025-0330 - March 20, 2025

In berriai/litellm version v1.52.1, an issue in proxy_server.py causes the leakage of Langfuse API keys when an error occurs while parsing team settings. This vulnerability exposes sensitive information, including langfuse_secret and langfuse_public_key, which can provide full access to the Langfuse project storing all requests.

Exposure of Sensitive Information Through Metadata

RCE in litellm 1.40.12 via post_call_rules config
CVE-2024-6825 - March 20, 2025

BerriAI/litellm version 1.40.12 contains a vulnerability that allows remote code execution. The issue exists in the handling of the 'post_call_rules' configuration, where a callback function can be added. The provided value is split at the final '.' mark, with the last part considered the function name and the remaining part appended with the '.py' extension and imported. This allows an attacker to set a system method, such as 'os.system', as a callback, enabling the execution of arbitrary commands when a chat response is processed.

Code Injection

Unauth DoS via Multipart Boundary in litellm v1.44.5 (HTTPRequest)
CVE-2024-8984 - March 20, 2025

A Denial of Service (DoS) vulnerability exists in berriai/litellm version v1.44.5. This vulnerability can be exploited by appending characters, such as dashes (-), to the end of a multipart boundary in an HTTP request. The server continuously processes each character, leading to excessive resource consumption and rendering the service unavailable. The issue is unauthenticated and does not require any user interaction, impacting all users of the service.

Allocation of Resources Without Limits or Throttling

Litellm v1.44.12: API Key Leakage in litellm_logging
CVE-2024-9606 7.5 - High - March 20, 2025

In berriai/litellm before version 1.44.12, the `litellm/litellm_core_utils/litellm_logging.py` file contains a vulnerability where the API key masking code only masks the first 5 characters of the key. This results in the leakage of almost the entire API key in the logs, exposing a significant amount of the secret key. The issue affects version v1.44.9.

Output Sanitization

SSRF via api_base in LiteLLM 1.38.10 (CVE-2024-6587)
CVE-2024-6587 7.5 - High - September 13, 2024

A Server-Side Request Forgery (SSRF) vulnerability exists in berriai/litellm version 1.38.10. This vulnerability allows users to specify the `api_base` parameter when making requests to `POST /chat/completions`, causing the application to send the request to the domain specified by `api_base`. This request includes the OpenAI API key. A malicious user can set the `api_base` to their own domain and intercept the OpenAI API key, leading to unauthorized access and potential misuse of the API key.

SSRF

Litellm 1.34.34 Improper ACL in Team Management Endpoints (CVE-2024-5710)
CVE-2024-5710 - June 27, 2024

berriai/litellm version 1.34.34 is vulnerable to improper access control in its team management functionality. This vulnerability allows attackers to perform unauthorized actions such as creating, updating, viewing, deleting, blocking, and unblocking any teams, as well as adding or deleting any member to or from any teams. The vulnerability stems from insufficient access control checks in various team management endpoints, enabling attackers to exploit these functionalities without proper authorization.

AuthZ

Remote Code Execution in litellm v1.35.8 via add_deployment env var injection
CVE-2024-5751 - June 27, 2024

BerriAI/litellm version v1.35.8 contains a vulnerability where an attacker can achieve remote code execution. The vulnerability exists in the `add_deployment` function, which decodes and decrypts environment variables from base64 and assigns them to `os.environ`. An attacker can exploit this by sending a malicious payload to the `/config/update` endpoint, which is then processed and executed by the server when the `get_secret` function is triggered. This requires the server to use Google KMS and a database to store a model.

Code Injection

litellm arbitrary file deletion via /audio/transcriptions
CVE-2024-4888 8.1 - High - June 06, 2024

BerriAI's litellm, in its latest version, is vulnerable to arbitrary file deletion due to improper input validation on the `/audio/transcriptions` endpoint. An attacker can exploit this vulnerability by sending a specially crafted request that includes a file path to the server, which then deletes the specified file without proper authorization or validation. This vulnerability is present in the code where `os.remove(file.filename)` is used to delete a file, allowing any user to delete critical files on the server such as SSH keys, SQLite databases, or configuration files.

AuthZ

Blind SQLi in litellm 1.27.14 '/team/update' raw SQL user_id deletion
CVE-2024-4890 4.9 - Medium - June 06, 2024

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.

SQL Injection

SQLi in Litellm /global/spend/logs via api_key param
CVE-2024-5225 7.2 - High - June 06, 2024

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).

SQL Injection

Code Injection in litellm 1.34.6 via eval in secret manager
CVE-2024-4889 7.2 - High - June 06, 2024

A code injection vulnerability exists in the berriai/litellm application, version 1.34.6, due to the use of unvalidated input in the eval function within the secret management system. This vulnerability requires a valid Google KMS configuration file to be exploitable. Specifically, by setting the `UI_LOGO_PATH` variable to a remote server address in the `get_image` function, an attacker can write a malicious Google KMS configuration file to the `cached_logo.jpg` file. This file can then be used to execute arbitrary code by assigning malicious code to the `SAVE_CONFIG_TO_DB` environment variable, leading to full system control. The vulnerability is contingent upon the use of the Google KMS feature.

Code Injection

SSTI via /completions in BerriAI/litellm (hf_chat_template)
CVE-2024-2952 - April 10, 2024

BerriAI/litellm is vulnerable to Server-Side Template Injection (SSTI) via the `/completions` endpoint. The vulnerability arises from the `hf_chat_template` method processing the `chat_template` parameter from the `tokenizer_config.json` file through the Jinja template engine without proper sanitization. Attackers can exploit this by crafting malicious `tokenizer_config.json` files that execute arbitrary code on the server.

Improper Neutralization of Equivalent Special Elements

Stay on top of Security Vulnerabilities

Want an email whenever new vulnerabilities are published for Litellm or by Litellm? Click the Watch button to subscribe.

Litellm
Vendor

Litellm
Product

subscribe