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

#35536 [Security]: Responses ID security fails open for raw or ownerless response IDs

  • State: open
  • Author: @emerzon

### Summary

The Responses ID security hook only checks ownership when an ID can be decrypted into an encrypted LiteLLM response ID with nonempty owner metadata. Raw IDs and IDs returned unchanged after encryption setup fails bypass the ownership check, and an encrypted ID with empty user and team fields is accepted for every non-admin key

### Current behavior

The pre-call hook calls `check_user_access_to_response_id()` only when `_is_encrypted_response_id()` returns `True`. If decryption fails or the ID is not in the expected managed format, the hook forwards the ID without an ownership check

When `LITELLM_SALT_KEY` and `master_key` are both absent, `_encrypt_response_id()` logs a warning and returns the provider response unchanged. This means a deployment with the security feature enabled can still return a raw response ID and later skip the security hook

The encrypted ID includes `user_api_key_dict.user_id or ""` and `team_id or ""`. The checker only rejects when either decoded field is truthy and differs from the caller. If both are empty, the function returns `True` for any non-admin caller

### Reproduction

The missing-key path can be exercised with `disable_responses_id…

GitHub resolver

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

Refresh page
vote history (2 events)
#0 of 0 · 31d18h18m1s ago — entered · #import:https:::github.com:berriai:litellm post #2541
The priority-queue feature is substantially harder because it introduces cross-cutting scheduling, worker coordination, persistence, concurrency, failure handling, and operational interfaces while preserving synchronous behavior. The security issue is narrower in implementation scope, though it carries high correctness and regression risk around authorization edge cases.
#0 of 0 · 31d18h16m25s ago — current · #import:https:::github.com:berriai:litellm post #2567
The security issue is harder because it requires careful changes across response-ID encryption, fallback handling, authorization semantics, backward compatibility, and security-focused testing. The logging issue is comparatively localized to embedding response persistence and regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search