6 views
-/https://github.com/berriai/litellm/issues/31052
GitHub · issue

#31052 Team admins can exfiltrate proxy env secrets via os.environ/ in DB-stored team models

  • State: open
  • Author: @sdudhani

### Summary

With `STORE_MODEL_IN_DB=true`, `os.environ/` references in a DB-stored model's `litellm_params` are resolved server-side, using the proxy process environment, at deployment load time. `/model/new` is a self-managed route, so a team admin (not only a proxy admin) can create a team-scoped model by passing a `team_id`, and there is no validation of the `litellm_params` they submit. A team admin can therefore set `api_key: os.environ/<ANY_PROXY_ENV_VAR>` together with an `api_base` they control, invoke the model, and receive the resolved secret as the upstream `Authorization` header.

The escalation is specifically the `os.environ/` resolution. Without it a team admin can only forward secrets they already know; with it they can reference and exfiltrate secrets they do not know, including `LITELLM_MASTER_KEY`, other providers' API keys, `DATABASE_URL`, and anything else in the proxy environment.

This is pre-existing behavior rather than something newly introduced; the resolution for DB-stored models regressed around v1.89.3 (see #30969) and is being restored in #31041. The restoration is correct for the operator use case, but it reopens this team-admin vector, so the acces…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h28m40s ago — entered · #import:https:::github.com:berriai:litellm post #2398
#31052 requires security-boundary analysis, authorization and input-validation changes, careful handling of persisted configuration and environment resolution, plus regression testing to avoid breaking legitimate deployments. #34692 is comparatively localized to streaming translation framing and protocol-specific tests.
#0 of 0 · 31d18h22m20s ago — current · #import:https:::github.com:berriai:litellm post #2485
The left issue is a localized update-semantics fix with focused regression tests. The right requires security-sensitive authorization changes across request validation, persistence, secret resolution, compatibility behavior, and broader regression testing, creating substantially greater implementation risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search