58 known bugs in litellm, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.
| Severity | Affected | Fixed in | Title | Status | Source |
|---|
| high | 1.81.8 | 1.83.10 | LiteLLM has a sandbox escape in custom-code guardrail ### Impact
The `POST /guardrails/test_custom_code` endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.
**Reaching the endpoint requires a proxy-admin credential** in default configurations.
### Patches
Fixed in **`1.83.11`**. The hand-rolled sandbox has been replaced with `RestrictedPython`. Upgrade to `1.83.11` or later.
### Workarounds
If upgrading is not immediately possible, block `POST /guardrails/test_custom_code` at your reverse proxy or API gateway.
### References
- Patched release: [`v1.83.10-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable) | fixed | osv:GHSA-wxxx-gvqv-xp7p |
| high | any | 1.83.10 | LiteLLM allows a user to modify their own user_role via the /user/update endpoint LiteLLM prior to 1.83.10 allows a user to modify their own user_role via the /user/update endpoint. While the endpoint correctly restricts users to updating only their own account, it does not restrict which fields may be changed. A user who can reach this endpoint can set their role to proxy_admin, gaining full administrative access to LiteLLM including all users, teams, keys, models, and prompt history. Users with the org_admin role have legitimate access to this endpoint and can exploit this vulnerability without chaining any additional flaw. | fixed | osv:GHSA-wpfp-gwwc-vwq6 |
| high | 1.74.2 | 1.83.7 | LiteLLM: Authenticated command execution via MCP stdio test endpoints ### Impact
Two endpoints used to preview an MCP server before saving it — `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` — accepted a full server configuration in the request body, including the `command`, `args`, and `env` fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process.
The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host.
### Patches
Fixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.
### Workarounds
If upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway. | fixed | osv:GHSA-v4p8-mg3p-g94g |
| high | any | 1.83.14 | LiteLLM allows an authenticated internal_user to create API keys with access to routes that their role does not permit LiteLLM prior to 1.83.14 allows an authenticated internal_user to create API keys with access to routes that their role does not permit. When generating a key, the allowed_routes field is stored without verifying that the specified routes fall within the user's own permissions. A key created with access to admin-only routes can then be used to reach those routes successfully, bypassing the role-based access controls that would otherwise block the request, enabling full privilege escalation from internal_user to proxy_admin. | fixed | osv:GHSA-qrc4-49gv-mv9m |
| high | any | 1.84.0 | LiteLLM: MCP Authentication Bypass via OAuth2 Passthrough Fallback ### Impact
LiteLLM's MCP Streamable HTTP endpoint could allow an unauthenticated attacker to establish an authenticated MCP session using an arbitrary Bearer token.
The MCP auth handler supported OAuth2 passthrough for upstream MCP servers, but the fallback path could replace failed LiteLLM key validation with an empty `UserAPIKeyAuth()` object. This allowed requests with a fabricated `Authorization` header to reach MCP tooling without a valid LiteLLM key.
An attacker could use this to list and call configured MCP tools and access connected services exposed through MCP.
### Patches
The issue is fixed in `1.84.0`.
We recommend upgrading to `1.84.0` or later.
### Workarounds
If upgrading is not immediately possible, disable MCP routes or block access to `/mcp/` and related MCP endpoints at your reverse proxy or API gateway.
### References
* [v1.84.0](https://github.com/BerriAI/litellm/releases/tag/v1.84.0) | fixed | osv:GHSA-7488-6r32-c95q |
| high | 1.80.5 | 1.83.7 | LiteLLM: Server-Side Template Injection in /prompts/test endpoint ### Impact
The `POST /prompts/test` endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process.
The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host.
Proxy deployments running an affected version are in scope.
### Patches
The issue is fixed in **`1.83.7-stable`**. The fix switches the prompt template renderer to a sandboxed environment that blocks the attributes this attack relies on.
LiteLLM recommends upgrading to `1.83.7-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Block `POST /prompts/test` at your reverse proxy or API gateway.
2. Review and rotate API keys that should not have access to prompt management routes. | fixed | osv:GHSA-xqmj-j6mv-4862 |
| high | any | 1.53.1.dev1 | LiteLLM Vulnerable to Denial of Service (DoS) A vulnerability in BerriAI/litellm, as of commit 26c03c9, allows unauthenticated users to cause a Denial of Service (DoS) by exploiting the use of ast.literal_eval to parse user input. This function is not safe and is prone to DoS attacks, which can crash the litellm Python server. | fixed | osv:GHSA-gw2q-qw9j-rgv7 |
| high | any | 1.44.12 | LiteLLM Reveals Portion of API Key via a Logging File 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. | fixed | osv:GHSA-g5pg-73fc-hjwq |
| high | any | 1.44.8 | LiteLLM Server-Side Request Forgery (SSRF) vulnerability 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. | fixed | osv:GHSA-g26j-5385-hhw3 |
| high | any | 1.61.15 | LiteLLM Has an Improper Authorization Vulnerability An improper authorization vulnerability exists in the main-latest version of BerriAI/litellm. When a user with the role 'internal_user_viewer' logs into the application, they are provided with an overly privileged API key. This key can be used to access all the admin functionality of the application, including endpoints such as '/users/list' and '/users/get_users'. This vulnerability allows for privilege escalation within the application, enabling any account to become a PROXY ADMIN. | fixed | osv:GHSA-fjcf-3j3r-78rp |
| high | any | 1.56.2 | LiteLLM Vulnerable to Denial of Service (DoS) via Crafted HTTP Request 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. | fixed | osv:GHSA-fh2c-86xm-pm2x |
| high | any | \u2014 | LiteLLM Has a Leakage of Langfuse API Keys 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. | open | osv:GHSA-879v-fggm-vxw2 |
| high | any | \u2014 | litellm passes untrusted data to `eval` function without sanitization A remote code execution (RCE) vulnerability exists in the berriai/litellm project due to improper control of the generation of code when using the `eval` function unsafely in the `litellm.get_secret()` method. Specifically, when the server utilizes Google KMS, untrusted data is passed to the `eval` function without any sanitization. Attackers can exploit this vulnerability by injecting malicious values into environment variables through the `/config/update` endpoint, which allows for the update of settings in `proxy_server_config.yaml`. | open | osv:GHSA-7ggm-4rjg-594w |
| high | any | 1.83.0 | LiteLLM: Password hash exposure and pass-the-hash authentication bypass ### Impact
Three issues combine into a full authentication bypass chain:
1. Weak hashing: User passwords are stored as unsalted SHA-256 hashes, making them vulnerable to rainbow table attacks and trivially identifying users with identical passwords.
2. Hash exposure: Multiple API endpoints (/user/info, /user/update, /spend/users) return the password hash field in responses to any authenticated user regardless of role. Plaintext passwords could also potentially be exposed in certain scenarios.
4. Pass-the-hash: The /v2/login endpoint accepts the raw SHA-256 hash as a valid password without re-hashing, allowing direct login with a stolen
An already authenticated user can retrieve another user's password hash from the API and use it to log in as that user. This enables full privilege escalation in three HTTP requests.
### Patches
Fixed in v1.83.0. Passwords are now hashed with scrypt (random 16-byte salt, n=16384, r=8, p=1). Password hashes are stripped from all API responses. Existing SHA-256 hashes are transparently migrated on next login. | fixed | osv:GHSA-69x8-hrgq-fjj8 |
| high | any | 1.83.0 | LiteLLM: Privilege escalation via unrestricted proxy configuration endpoint ### Impact
The `/config/update endpoint` does not enforce admin role authorization. A user who is already authenticated into the platform can then use this endpoint to do the following:
- Modify proxy configuration and environment variables
- Register custom pass-through endpoint handlers pointing to attacker-controlled Python code, achieving remote code execution
- Read arbitrary server files by setting UI_LOGO_PATH and fetching via /get_image
- Take over other priveleged accounts by overwriting UI_USERNAME and UI_PASSWORD environment variables
### Patches
Fixed in v1.83.0. The endpoint now requires `proxy_admin` role.
### Workarounds
Restrict API key distribution. There is no configuration-level workaround. | fixed | osv:GHSA-53mr-6c8q-9789 |
| high | 1.40.3.dev2 | \u2014 | LiteLLM Vulnerable to Remote Code Execution (RCE) 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. | open | osv:GHSA-53gh-p8jc-7rg8 |
| high | any | 1.35.36 | Arbitrary file deletion in litellm 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. | fixed | osv:GHSA-3xr8-qfvj-9p9j |
| medium | 1.81.16 | 1.83.7 | LiteLLM has SQL Injection in Proxy API key verification ### Impact
A database query used during proxy API key checks mixed the caller-supplied key value into the query text instead of passing it as a separate parameter. An unauthenticated attacker could send a specially crafted `Authorization` header to any LLM API route (for example `POST /chat/completions`) and reach this query through the proxy's error-handling path.
An attacker could read data from the proxy's database and may be able to modify it, leading to unauthorised access to the proxy and the credentials it manages.
### Patches
Fixed in **`1.83.7`**. The caller-supplied value is now always passed to the database as a separate parameter. Upgrade to `1.83.7` or later.
### Workarounds
If upgrading is not immediately possible, set `disable_error_logs: true` under `general_settings`. This removes the path through which unauthenticated input reaches the vulnerable query.
### References
- Patched release: [`v1.83.7-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable)
**Discovery Credit**: Tencent YunDing Security Lab | fixed | osv:PYSEC-2026-391 |
| medium | any | 1.83.0 | LiteLLM: Authentication bypass via OIDC userinfo cache key collision ### Impact
When JWT authentication is enabled (`enable_jwt_auth: true`), the OIDC userinfo cache uses `token[:20]` as the cache key. JWT headers produced by the same signing algorithm generate identical first 20 characters.
This configuration option is not enabled by default. **Most instances are not affected.**
An unauthenticated attacker can craft a token whose first 20 characters match a legitimate user's cached token. On cache hit, the attacker inherits the legitimate user's identity and permissions. This affects deployments with JWT/OIDC authentication enabled.
### Patches
Fixed in v1.83.0. The cache key now uses the full hash of the JWT token.
### Workarounds
Disable OIDC userinfo caching by setting the cache TTL to 0, or disable JWT authentication entirely. | fixed | osv:PYSEC-2026-390 |
| medium | any | 1.40.16 | litellm vulnerable to remote code execution based on using eval unsafely 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. | fixed | osv:PYSEC-2026-389 |
| medium | any | 1.84.0 | LiteLLM: Authentication Bypass via Host Header Injection ### Impact
A Host-header parsing flaw in the LiteLLM proxy could, under specific conditions, allow unauthenticated access to protected management routes.
The auth layer derived the effective route from `request.url.path` in `litellm/proxy/auth/auth_utils.py::get_request_route()`, which Starlette reconstructs from the `Host` header. A crafted `Host` could therefore make the auth gate evaluate a different route from the one FastAPI dispatched.
**Most deployments are not affected.** The bypass is blocked by any upstream layer that validates or normalizes `Host`, such as:
- a CDN or WAF, such as Cloudflare
- a reverse proxy with `server_name` allowlists
- a host-based load balancer
**LiteLLM Cloud customers are not affected.**
### Patches
Fixed in **`1.84.0`**. Upgrade to `1.84.0` or later. No configuration change is required.
### Workarounds
If upgrading is not immediately possible, place the proxy behind an upstream component that validates or normalizes the `Host` header before forwarding (a CDN/WAF, a reverse proxy with explicit `server_name` allowlists, or a cloud load balancer with host-based routing rules), or otherwise restrict network access to the proxy listener.
### References
- Patched release: [`v1.84.0`](https://github.com/BerriAI/litellm/releases/tag/v1.84.0)
**Discovery Credit**: Le The Thang (KCSC) and Kim Ngoc Chung (One Mount Group) | fixed | osv:PYSEC-2026-388 |
| medium | any | 1.34.42 | LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint 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. | fixed | osv:PYSEC-2026-387 |
| medium | any | 1.84.0 | LiteLLM: MCP Authentication Bypass via OAuth2 Passthrough Fallback ### Impact
LiteLLM's MCP Streamable HTTP endpoint could allow an unauthenticated attacker to establish an authenticated MCP session using an arbitrary Bearer token.
The MCP auth handler supported OAuth2 passthrough for upstream MCP servers, but the fallback path could replace failed LiteLLM key validation with an empty `UserAPIKeyAuth()` object. This allowed requests with a fabricated `Authorization` header to reach MCP tooling without a valid LiteLLM key.
An attacker could use this to list and call configured MCP tools and access connected services exposed through MCP.
### Patches
The issue is fixed in `1.84.0`.
We recommend upgrading to `1.84.0` or later.
### Workarounds
If upgrading is not immediately possible, disable MCP routes or block access to `/mcp/` and related MCP endpoints at your reverse proxy or API gateway.
### References
* [v1.84.0](https://github.com/BerriAI/litellm/releases/tag/v1.84.0) | fixed | osv:PYSEC-2026-3479 |
| medium | any | 1.82.0 | LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks ### Impact
LiteLLM's Custom Code Guardrails production create/update paths did not apply the same sandboxing and validation used by the test endpoint.
A privileged user with access to create or update guardrails could submit custom Python code that executed in the LiteLLM proxy environment. In deployments without a configured master key, callers could be treated as proxy administrators, making this reachable without intended administrative authorization.
This could allow arbitrary code execution in the LiteLLM proxy container and exposure of secrets available to the process.
### Patches
The issue is fixed in `1.82.0-stable`.
LiteLLM recommend upgrading to `1.82.0-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Restrict access to `POST /guardrails` and `PUT /guardrails/{guardrail_id}` to trusted administrators only.
2. Ensure `LITELLM_MASTER_KEY` is configured.
3. Avoid enabling Custom Code Guardrails for untrusted users. | fixed | osv:PYSEC-2026-3478 |
| medium | any | 1.83.7 | LiteLLM: Arbitrary file write via path traversal in Skills archive extraction ### Impact
LiteLLM Skills archive extraction did not sufficiently validate file paths from uploaded skill ZIP archives. An authenticated user with access to LiteLLM LLM API routes, or a key whose `allowed_routes` includes `/v1/skills`, `anthropic_routes`, or `llm_api_routes`, could upload a crafted skill archive containing path traversal entries.
When the skill was processed for execution, those entries could be written outside the intended extraction/staging directory. This could allow arbitrary file write and may lead to code execution depending on deployment configuration and writable paths.
### Patches
The issue is fixed in `1.83.7-stable`.
LiteLLM recommens upgrading to `1.83.7-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Block `POST /v1/skills` at your reverse proxy or API gateway.
2. Restrict Skills API access to trusted users only. | fixed | osv:PYSEC-2026-3477 |
| medium | any | 1.83.10 | LiteLLM: Local file read via request-supplied OIDC file references ### Impact
LiteLLM's `/health/test_connection` endpoint resolved request-supplied environment and OIDC file references in `litellm_params`. A proxy administrator, or another privileged caller with permission to test model connections, could cause LiteLLM to read files from the local filesystem via an `oidc/file/` reference.
Because exploitation requires privileged proxy access, this is treated as a defense-in-depth issue rather than a cross-tenant privilege bypass.
### Patches
The issue is fixed in `1.83.10-stable`.
LiteLLM recommend upgrading to `1.83.10-stable` or later.
### Workarounds
Restrict `/health/test_connection` access to trusted administrators only. | fixed | osv:PYSEC-2026-3476 |
| medium | 1.80.5 | 1.83.7 | LiteLLM: Server-Side Template Injection in /prompts/test endpoint ### Impact
The `POST /prompts/test` endpoint accepted user-supplied prompt templates and rendered them without sandboxing. A crafted template could run arbitrary code inside the LiteLLM Proxy process.
The endpoint only checks that the caller presents a valid proxy API key, so any authenticated user could reach it. Depending on how the proxy is deployed, this could expose secrets in the process environment (such as provider API keys or database credentials) and allow commands to be run on the host.
Proxy deployments running an affected version are in scope.
### Patches
The issue is fixed in **`1.83.7-stable`**. The fix switches the prompt template renderer to a sandboxed environment that blocks the attributes this attack relies on.
LiteLLM recommends upgrading to `1.83.7-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Block `POST /prompts/test` at your reverse proxy or API gateway.
2. Review and rotate API keys that should not have access to prompt management routes. | fixed | osv:PYSEC-2026-2602 |
| medium | 1.81.8 | 1.83.10 | LiteLLM has a sandbox escape in custom-code guardrail ### Impact
The `POST /guardrails/test_custom_code` endpoint runs user-supplied Python inside a hand-rolled sandbox. The sandbox can be escaped using bytecode-level techniques, allowing arbitrary code execution in the proxy process — which runs as root in the default Docker image.
**Reaching the endpoint requires a proxy-admin credential** in default configurations.
### Patches
Fixed in **`1.83.11`**. The hand-rolled sandbox has been replaced with `RestrictedPython`. Upgrade to `1.83.11` or later.
### Workarounds
If upgrading is not immediately possible, block `POST /guardrails/test_custom_code` at your reverse proxy or API gateway.
### References
- Patched release: [`v1.83.10-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.10-stable) | fixed | osv:PYSEC-2026-2601 |
| medium | any | 1.83.10 | LiteLLM allows a user to modify their own user_role via the /user/update endpoint LiteLLM prior to 1.83.10 allows a user to modify their own user_role via the /user/update endpoint. While the endpoint correctly restricts users to updating only their own account, it does not restrict which fields may be changed. A user who can reach this endpoint can set their role to proxy_admin, gaining full administrative access to LiteLLM including all users, teams, keys, models, and prompt history. Users with the org_admin role have legitimate access to this endpoint and can exploit this vulnerability without chaining any additional flaw. | fixed | osv:PYSEC-2026-2600 |
| medium | 1.74.2 | 1.83.7 | LiteLLM: Authenticated command execution via MCP stdio test endpoints ### Impact
Two endpoints used to preview an MCP server before saving it — `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` — accepted a full server configuration in the request body, including the `command`, `args`, and `env` fields used by the stdio transport. When called with a stdio configuration, the endpoints attempted to connect, which spawned the supplied command as a subprocess on the proxy host with the privileges of the proxy process.
The endpoints were gated only by a valid proxy API key, with no role check. Any authenticated user — including holders of low-privilege internal-user keys — could therefore run arbitrary commands on the host.
### Patches
Fixed in **`1.83.7`**. Both test endpoints now require the `PROXY_ADMIN` role, bringing them into line with the save endpoint.
### Workarounds
If upgrading is not immediately possible, developers should block `POST /mcp-rest/test/connection` and `POST /mcp-rest/test/tools/list` at their reverse proxy or API gateway. | fixed | osv:PYSEC-2026-2599 |
| medium | any | 1.83.14 | LiteLLM allows an authenticated internal_user to create API keys with access to routes that their role does not permit LiteLLM prior to 1.83.14 allows an authenticated internal_user to create API keys with access to routes that their role does not permit. When generating a key, the allowed_routes field is stored without verifying that the specified routes fall within the user's own permissions. A key created with access to admin-only routes can then be used to reach those routes successfully, bypassing the role-based access controls that would otherwise block the request, enabling full privilege escalation from internal_user to proxy_admin. | fixed | osv:PYSEC-2026-2598 |
| medium | any | 1.83.0 | LiteLLM: Privilege escalation via unrestricted proxy configuration endpoint ### Impact
The `/config/update endpoint` does not enforce admin role authorization. A user who is already authenticated into the platform can then use this endpoint to do the following:
- Modify proxy configuration and environment variables
- Register custom pass-through endpoint handlers pointing to attacker-controlled Python code, achieving remote code execution
- Read arbitrary server files by setting UI_LOGO_PATH and fetching via /get_image
- Take over other priveleged accounts by overwriting UI_USERNAME and UI_PASSWORD environment variables
### Patches
Fixed in v1.83.0. The endpoint now requires `proxy_admin` role.
### Workarounds
Restrict API key distribution. There is no configuration-level workaround. | fixed | osv:PYSEC-2026-2597 |
| medium | any | 1.40.15 | litellm vulnerable to improper access control in team management 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. | fixed | osv:PYSEC-2026-1551 |
| medium | any | 1.40.0 | SQL injection in litellm 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). | fixed | osv:PYSEC-2026-1550 |
| medium | any | 1.53.1.dev1 | LiteLLM Vulnerable to Denial of Service (DoS) A vulnerability in BerriAI/litellm, as of commit 26c03c9, allows unauthenticated users to cause a Denial of Service (DoS) by exploiting the use of ast.literal_eval to parse user input. This function is not safe and is prone to DoS attacks, which can crash the litellm Python server. | fixed | osv:PYSEC-2026-1549 |
| medium | any | 1.44.12 | LiteLLM Reveals Portion of API Key via a Logging File 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. | fixed | osv:PYSEC-2026-1548 |
| medium | any | 1.44.8 | LiteLLM Server-Side Request Forgery (SSRF) vulnerability 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. | fixed | osv:PYSEC-2026-1547 |
| medium | any | 1.61.15 | LiteLLM Has an Improper Authorization Vulnerability An improper authorization vulnerability exists in the main-latest version of BerriAI/litellm. When a user with the role 'internal_user_viewer' logs into the application, they are provided with an overly privileged API key. This key can be used to access all the admin functionality of the application, including endpoints such as '/users/list' and '/users/get_users'. This vulnerability allows for privilege escalation within the application, enabling any account to become a PROXY ADMIN. | fixed | osv:PYSEC-2026-1546 |
| medium | any | 1.56.2 | LiteLLM Vulnerable to Denial of Service (DoS) via Crafted HTTP Request 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. | fixed | osv:PYSEC-2026-1545 |
| medium | any | \u2014 | SQL injection in litellm 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. | open | osv:PYSEC-2026-1544 |
| medium | any | \u2014 | LiteLLM Has a Leakage of Langfuse API Keys 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. | open | osv:PYSEC-2026-1543 |
| medium | any | \u2014 | litellm passes untrusted data to `eval` function without sanitization A remote code execution (RCE) vulnerability exists in the berriai/litellm project due to improper control of the generation of code when using the `eval` function unsafely in the `litellm.get_secret()` method. Specifically, when the server utilizes Google KMS, untrusted data is passed to the `eval` function without any sanitization. Attackers can exploit this vulnerability by injecting malicious values into environment variables through the `/config/update` endpoint, which allows for the update of settings in `proxy_server_config.yaml`. | open | osv:PYSEC-2026-1542 |
| medium | 1.40.3.dev2 | \u2014 | LiteLLM Vulnerable to Remote Code Execution (RCE) 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. | open | osv:PYSEC-2026-1541 |
| medium | any | 1.35.36 | Arbitrary file deletion in litellm 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. | fixed | osv:PYSEC-2026-1540 |
| medium | any | 1.83.7 | LiteLLM: Arbitrary file write via path traversal in Skills archive extraction ### Impact
LiteLLM Skills archive extraction did not sufficiently validate file paths from uploaded skill ZIP archives. An authenticated user with access to LiteLLM LLM API routes, or a key whose `allowed_routes` includes `/v1/skills`, `anthropic_routes`, or `llm_api_routes`, could upload a crafted skill archive containing path traversal entries.
When the skill was processed for execution, those entries could be written outside the intended extraction/staging directory. This could allow arbitrary file write and may lead to code execution depending on deployment configuration and writable paths.
### Patches
The issue is fixed in `1.83.7-stable`.
LiteLLM recommens upgrading to `1.83.7-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Block `POST /v1/skills` at your reverse proxy or API gateway.
2. Restrict Skills API access to trusted users only. | fixed | osv:GHSA-5jmr-gcrj-2c9q |
| medium | 1.82.7 | \u2014 | Two litellm versions published containing credential harvesting malware After an API Token exposure from an exploited Trivy dependency,
two new releases of `litellm` were uploaded to PyPI containing automatically activated malware,
harvesting sensitive credentials and files, and exfiltrating to a remote API.
The malicious code runs during importing any module from the package and scans
the file system and environment variables, collecting all kinds of
sensitive data, including but not limited to private SSH keys, credentials to Git and
Docker repositories, dotenv files, tokens to Kubernetes service accounts,
databases and LDAP configuration. Also exfiltrated are multiple shell history
files and cryptowallet keys. The malware actively attempts to obtain cloud access tokens
from metadata servers and retrieve secrets stored in AWS Secrets Manager.
All collected data are sent to the domain models.litellm[.]cloud
Furthermore, the code includes a persistence mechanism by configuring
a SystemD service unit masqueraded as "System Telemetry Service" on the host it
runs on, and in a Kubernetes environment also by creating a new pod.
The persistence script then contacts hxxps://checkmarx[.]zone/raw for
further instructions.
Anyone who has installed and run the project should assume
any credentials available to litellm environment may have been exposed,
and revoke/rotate them accordingly. The affected environment should be
isolated and carefully reviewed against any unexpected modifications
and network traffic.
| open | osv:PYSEC-2026-2 |
| medium | any | \u2014 | Malicious code in litellm (PyPI)
---
_-= Per source details. Do not edit below this line.=-_
## Source: google-open-source-security (6a89401cbf53902e8374fbf3b424a77bb5e5f8c437176232eab7c3237d10ecbe)
LiteLLM was compromised through trivy security scan in a GitHub workflow.
Attackers uploaded malicious versions of LiteLLM to PyPI. The malicious
code would exfiltrate sensitive secrets to an attcker controlled domain.
## Source: ossf-package-analysis (c1d5a2e721c5f8b33b0530ddf98150cadf034a8cd16483e143fc2925b2cfa70c)
The OpenSSF Package Analysis project identified 'litellm' @ 1.82.8 (pypi) as malicious.
It is considered malicious because:
- The package executes one or more commands associated with malicious behavior.
| open | osv:MAL-2026-2144 |
| medium | any | 1.40.15 | litellm vulnerable to improper access control in team management 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. | fixed | osv:GHSA-qqcv-vg9f-5rr3 |
| medium | any | 1.40.0 | SQL injection in litellm 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). | fixed | osv:GHSA-h6m6-jj8v-94jj |
| medium | any | \u2014 | SQL injection in litellm 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. | open | osv:GHSA-8j42-pcfm-3467 |
| low | any | 1.82.0 | LiteLLM: Custom Code Guardrails production endpoints bypass code safety checks ### Impact
LiteLLM's Custom Code Guardrails production create/update paths did not apply the same sandboxing and validation used by the test endpoint.
A privileged user with access to create or update guardrails could submit custom Python code that executed in the LiteLLM proxy environment. In deployments without a configured master key, callers could be treated as proxy administrators, making this reachable without intended administrative authorization.
This could allow arbitrary code execution in the LiteLLM proxy container and exposure of secrets available to the process.
### Patches
The issue is fixed in `1.82.0-stable`.
LiteLLM recommend upgrading to `1.82.0-stable` or later.
### Workarounds
If upgrading is not immediately possible:
1. Restrict access to `POST /guardrails` and `PUT /guardrails/{guardrail_id}` to trusted administrators only.
2. Ensure `LITELLM_MASTER_KEY` is configured.
3. Avoid enabling Custom Code Guardrails for untrusted users. | fixed | osv:GHSA-72m8-9m7m-h278 |
| low | any | 1.83.10 | LiteLLM: Local file read via request-supplied OIDC file references ### Impact
LiteLLM's `/health/test_connection` endpoint resolved request-supplied environment and OIDC file references in `litellm_params`. A proxy administrator, or another privileged caller with permission to test model connections, could cause LiteLLM to read files from the local filesystem via an `oidc/file/` reference.
Because exploitation requires privileged proxy access, this is treated as a defense-in-depth issue rather than a cross-tenant privilege bypass.
### Patches
The issue is fixed in `1.83.10-stable`.
LiteLLM recommend upgrading to `1.83.10-stable` or later.
### Workarounds
Restrict `/health/test_connection` access to trusted administrators only. | fixed | osv:GHSA-4g5m-c9r5-49xf |
| critical | 1.81.16 | 1.83.7 | LiteLLM has SQL Injection in Proxy API key verification ### Impact
A database query used during proxy API key checks mixed the caller-supplied key value into the query text instead of passing it as a separate parameter. An unauthenticated attacker could send a specially crafted `Authorization` header to any LLM API route (for example `POST /chat/completions`) and reach this query through the proxy's error-handling path.
An attacker could read data from the proxy's database and may be able to modify it, leading to unauthorised access to the proxy and the credentials it manages.
### Patches
Fixed in **`1.83.7`**. The caller-supplied value is now always passed to the database as a separate parameter. Upgrade to `1.83.7` or later.
### Workarounds
If upgrading is not immediately possible, set `disable_error_logs: true` under `general_settings`. This removes the path through which unauthenticated input reaches the vulnerable query.
### References
- Patched release: [`v1.83.7-stable`](https://github.com/BerriAI/litellm/releases/tag/v1.83.7-stable)
**Discovery Credit**: Tencent YunDing Security Lab | fixed | osv:GHSA-r75f-5x8p-qvmc |
| critical | any | 1.84.0 | LiteLLM: Authentication Bypass via Host Header Injection ### Impact
A Host-header parsing flaw in the LiteLLM proxy could, under specific conditions, allow unauthenticated access to protected management routes.
The auth layer derived the effective route from `request.url.path` in `litellm/proxy/auth/auth_utils.py::get_request_route()`, which Starlette reconstructs from the `Host` header. A crafted `Host` could therefore make the auth gate evaluate a different route from the one FastAPI dispatched.
**Most deployments are not affected.** The bypass is blocked by any upstream layer that validates or normalizes `Host`, such as:
- a CDN or WAF, such as Cloudflare
- a reverse proxy with `server_name` allowlists
- a host-based load balancer
**LiteLLM Cloud customers are not affected.**
### Patches
Fixed in **`1.84.0`**. Upgrade to `1.84.0` or later. No configuration change is required.
### Workarounds
If upgrading is not immediately possible, place the proxy behind an upstream component that validates or normalizes the `Host` header before forwarding (a CDN/WAF, a reverse proxy with explicit `server_name` allowlists, or a cloud load balancer with host-based routing rules), or otherwise restrict network access to the proxy listener.
### References
- Patched release: [`v1.84.0`](https://github.com/BerriAI/litellm/releases/tag/v1.84.0)
**Discovery Credit**: Le The Thang (KCSC) and Kim Ngoc Chung (One Mount Group) | fixed | osv:GHSA-4xpc-pv4p-pm3w |
| critical | any | 1.83.0 | LiteLLM: Authentication bypass via OIDC userinfo cache key collision ### Impact
When JWT authentication is enabled (`enable_jwt_auth: true`), the OIDC userinfo cache uses `token[:20]` as the cache key. JWT headers produced by the same signing algorithm generate identical first 20 characters.
This configuration option is not enabled by default. **Most instances are not affected.**
An unauthenticated attacker can craft a token whose first 20 characters match a legitimate user's cached token. On cache hit, the attacker inherits the legitimate user's identity and permissions. This affects deployments with JWT/OIDC authentication enabled.
### Patches
Fixed in v1.83.0. The cache key now uses the full hash of the JWT token.
### Workarounds
Disable OIDC userinfo caching by setting the cache TTL to 0, or disable JWT authentication entirely. | fixed | osv:GHSA-jjhc-v7c2-5hh6 |
| critical | any | 1.40.16 | litellm vulnerable to remote code execution based on using eval unsafely 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. | fixed | osv:GHSA-gppg-gqw8-wh9g |
| critical | 1.82.7 | \u2014 | Two LiteLLM versions published containing credential harvesting malware After an API Token exposure from an exploited trivy dependency, two new releases of `litellm` were uploaded to PyPI containing automatically activated malware, harvesting sensitive credentials and files, and exfiltrating to a remote API.
Anyone who has installed and run the project should assume any credentials available to litellm environment may have been exposed, and revoke/rotate thema ccordingly. | open | osv:GHSA-5mg7-485q-xm76 |
| critical | any | 1.34.42 | LiteLLM has Server-Side Template Injection vulnerability in /completions endpoint 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. | fixed | osv:GHSA-46cm-pfwv-cgf8 |
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/bugs/pypi/litellm