8 views
-/https://github.com/berriai/litellm/issues/35535
GitHub · issue

#35535 [Security]: Cached proxy-admin keys bypass blocked-key checks

  • State: open
  • Author: @emerzon

### Summary

A cached key whose role is `PROXY_ADMIN` returns from `user_api_key_auth()` before the normal `blocked` check. A stale local cache entry on another worker can therefore continue to authenticate after the key has been blocked in the database

### Current behavior

After loading a cached `UserAPIKeyAuth`, the proxy has a privileged early return for proxy-admin keys. That path checks expiration and updates request context, but it does not check `valid_token.blocked`

The ordinary non-admin path checks `valid_token.blocked` later

`block_key()` updates the database and attempts to delete the key from the local cache and the shared cache. The invalidation is not guaranteed to synchronously remove a stale entry from every worker. A worker that still serves the old cached admin object reaches the privileged early return and never consults the database

### Reproduction

Use two proxy workers with a shared database and cache:

1. Authenticate an admin key through worker B so its local cache contains `blocked=False` 2. Block the key through the management API or directly in the database 3. Make another request with the same key through worker B before its local cache refreshes …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h15m19s ago — entered · #import:https:::github.com:berriai:litellm post #2695
The security fix is harder because it affects privileged authentication control flow, distributed cache invalidation consistency, multi-worker behavior, and requires careful regression and security testing. The MCP change is comparatively localized to authenticated OpenAPI spec retrieval and its call sites.
#0 of 0 · 31d17h50m31s ago — current · #import:https:::github.com:berriai:litellm post #3131
The security issue is harder because it affects authorization correctness across cached and distributed state, requiring careful invalidation semantics, race-condition analysis, regression coverage, and security review. The client-leak issue is comparatively localized to lifecycle dispatch and teardown handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search