17 views
-/https://github.com/berriai/litellm/issues/21540
GitHub Β· issue

#21540 Inconsistent default access: empty models list grants all access, empty MCP list grants none

  • State: open
  • Author: @madhu19991

## Summary

When creating a virtual key (or team), leaving the `models` field empty (`[]` or unset) grants access to **all models on the proxy**. In contrast, leaving `object_permission.mcp_servers` empty grants access to **no MCP servers**. These opposite defaults create a security risk for models.

## Current Behavior

| Field | Empty/unset | Explicit list | |---|---|---| | `models` | **All models** (unlimited access) | Only listed models | | `object_permission.mcp_servers` | **No servers** (no access) | Only listed servers |

### How it works in the code

**Models** (`litellm/proxy/auth/model_checks.py:157-190`): ```python # Fallback chain: key models β†’ team models β†’ ALL proxy models if key_models: append_unique(key_models) elif team_models: append_unique(team_models) else: append_unique(proxy_model_list) # ← grants everything ```

And in `litellm/proxy/auth/auth_checks.py:2055`: ```python if (len(filtered_models) == 0 and len(models) == 0): all_model_access = True # ← empty = unlimited ```

**MCP servers** (`litellm/proxy/_experimental/mcp_server/db.py:199-232`): - Empty `object_permission.mcp_servers` β†’ empty set β†’ no access (least-privilege)

## Risk

A team…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 Β· 31d17h48m8s ago β€” entered Β· #import:https:::github.com:berriai:litellm post #3068
Authorization-default changes affect multiple permission paths, create backward-compatibility and security risks, and require broad regression coverage; the readiness behavior is comparatively localized with a narrower implementation and test surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search