7 views
-/https://github.com/berriai/litellm/issues/34928
GitHub ยท issue

#34928 [Security] MCP Server `_probe_upstream_auth` โ€” SSRF + Fail-Open Auth Bypass

  • State: open
  • Author: @Correctover

# [Security] MCP Server `_probe_upstream_auth` โ€” SSRF + Fail-Open Auth Bypass

## Summary The MCP Server's `_probe_upstream_auth()` function in `server.py` makes HTTP POST requests to user-configured MCP server URLs **without SSRF protection** (uses raw `client.post()` instead of `async_safe_get()`). Additionally, the function **fails open** on network errors โ€” returning `(200, None)` which allows the request through without auth verification. This creates both an SSRF vector and an authentication bypass.

## Affected Component - **File**: `litellm/proxy/_experimental/mcp_server/server.py` - **Function**: `_probe_upstream_auth()` (line 3864) - **Caller**: `_check_passthrough_upstream_auth()` (line ~3920), called during MCP request routing

## Root Cause

### Issue 1: SSRF ```python # server.py line 3888-3889 client = get_async_httpx_client( llm_provider=httpxSpecialProvider.MCP, params={"timeout": timeout}, ) # ... resp = await client.post( # โ† raw HTTP, no SSRF protection url=url, # โ† user-configured MCP server URL headers=probe_headers, json=probe_payload, timeout=timeout, ) ```

The `url` parameter comes from `mcp_server.url` which โ€ฆ

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 ยท 31d18h30m51s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #2359
The left task is harder because it requires security-boundary changes, careful failure-semantics decisions, compatibility review, and broader regression testing; the right task is more localized to protocol translation and streaming-state handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search