| Title | litellm <= 1.63.1 Improper Authorization (CWE-285) |
|---|
| Description | # Technical Details
A Privilege Escalation vulnerability exists in the `block_key` and `unblock_key` methods in `litellm/proxy/management_endpoints/key_management_endpoints.py` of litellm.
The application fails to restrict access to key management operations. The endpoints `/key/block` and `/key/unblock` implicitly grant access to any user with the `internal_user` role instead of enforcing ownership checks or limiting operations to `proxy_admin` level accounts.
# Vulnerable Code
File: `litellm/proxy/management_endpoints/key_management_endpoints.py`
Method: `block_key`, `unblock_key`
Why: The API routes for key blocking/unblocking are included in `internal_user_routes`. Inside the actual logic, no verification is done to determine if the target key being disabled/enabled belongs to the requesting user or if the requesting user possesses administrative privileges.
# Reproduction
1. Establish a LiteLLM proxy instance and obtain an `internal_user` API key (`<ATTACKER_KEY>`).
2. Identify or guess an existing key belonging to another user, potentially an administrator.
3. Send a POST request to block the target key using the lower-privileged token: `curl -X POST "http://localhost:4000/key/block" -H "Authorization: Bearer <ATTACKER_KEY>" -H "Content-Type: application/json" -d '{"key": "<ADMIN_KEY>"}'`
4. The target key is disabled, denying its owner access to the proxy. The attacker can identically unblock it later.
# Impact
- Denial of Service (DoS) against administrative or production systems by disabling valid keys.
- Privilege Escalation, allowing a regular internal user to manipulate system-wide access without adequate auditing. |
|---|
| Source | ⚠️ https://gist.github.com/YLChen-007/993c68152b2c770d53590f1684c755d4 |
|---|
| User | Eric-c (UID 96848) |
|---|
| Submission | 04/23/2026 09:55 (2 months ago) |
|---|
| Moderation | 06/20/2026 11:26 (2 months later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 372512 [BerriAI litellm up to 1.63.1 Admin Key key_management_endpoints.py improper authorization] |
|---|
| Points | 20 |
|---|