CVE-2026-52869: MCP Python SDK: HTTP transports serve session requests without verifying the authenticated principal
Summary In affected versions, the SSE and Streamable HTTP server transports routed incoming requests to an existing session based only on the session identifier, without verifying that the request was authenticated as the same principal that created the session. Anyone who learned or guessed a session ID could send JSON-RPC messages on that session, regardless of which bearer token the request carried.
Am I affected? Only if a developer's application server uses an HTTP transport (SSE, or Streamable HTTP in stateful mode) and authenticates requests. Servers on stdio, stateless Streamable HTTP, or with no authentication configured are not affected.
Details Both transports look up the target session by its identifier alone — the sessionid query parameter for SSE (mcp.server.sse.SseServerTransport) and the Mcp-Session-Id header for Streamable HTTP (mcp.server.streamablehttpmanager.StreamableHTTPSessionManager). Once the lookup succeeded, the request was handled on that session without comparing its authentication context to the credentials presented when the session was created, so a request authenticated as a different OAuth client could inject messages into the session. On the SSE transport the response is delivered to the original client's event stream; on the Streamable HTTP transport it is returned on the injecting request, so the injecting client can also read the result. The SSE transport has been affected since the first release; the Streamable HTTP transport since version 1.8.0.
Impact Servers using either HTTP transport together with the SDK's built-in bearer-token authentication are affected: the per-client isolation that authentication provides can be bypassed for any session whose ID is known. Session IDs are randomly generated UUIDs, so exploitation requires obtaining one out of band (logs, network observation). Servers that do not enable bearer-token authentication have no per-client isolation to bypass and are not addressed by this advisory, and stateless Streamable HTTP deployments do not maintain sessions and are unaffected.
Mitigation Upgrade to version 1.27.2 or later, which records the authenticated principal that created each session — the OAuth client ID together with the token's issuer and subject when the token verifier supplies them — and answers requests presenting a different principal with the same 404 response as for an unknown session.
Deployments where many end users share a single OAuth client (hosted MCP clients, gateways) should ensure their token verifier populates AccessToken.subject (e.g. from the token's sub claim) so sessions are isolated per user rather than per client. Deployments using a custom authentication backend other than the built-in BearerAuthBackend should enforce an equivalent check themselves.
Other sources
The MCP Python SDK, called mcp on PyPI, is a Python implementation of the Model Context Protocol (MCP). Prior to 1.27.2, the SSE and stateful Streamable HTTP transports mcp.server.sse.SseServerTransport and mcp.server.streamablehttpmanager.StreamableHTTPSessionManager route requests to existing sessions using only the sessionid query parameter or Mcp-Session-Id header without verifying the authenticated principal that created the session, allowing a different bearer-token-authenticated client with a known session ID to inject JSON-RPC messages into that session. This issue is fixed in version 1.27.2.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/mcpto a version that resolves this vulnerability.Fixed in 1.27.2 - Upgrade
Upgrade
MCP Python SDKto a version that resolves this vulnerability.Fixed in 1.27.2 - Configuration
If using a custom authentication backend other than the built-in BearerAuthBackend, ensure your backend performs an equivalent check so that session lookup (by SSE session_id query parameter or Streamable HTTP Mcp-Session-Id header) also verifies the authenticated principal matches the principal that created the session.
Custom authentication backend (instead of built-in BearerAuthBackend) Principal isolation check for session routing = enforce equivalent check yourself - Configuration
For deployments where many end users share a single OAuth client (hosted MCP clients, gateways), ensure the token verifier populates AccessToken.subject (from the token's sub claim) so sessions are isolated per user rather than per client.
OAuth token verifier (shared OAuth client deployments) AccessToken.subject population = populate AccessToken.subject - Compensating control
If many end users share a single OAuth client and you cannot upgrade immediately, consider compensating by ensuring token verifiers associate authenticated requests to per-user principals (e.g., by ensuring AccessToken.subject from the token's sub claim) so that sessions are isolated per user.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-52869?
The severity of CVE-2026-52869 is high, with a CVSS score of 7.1.
How do I fix CVE-2026-52869?
To fix CVE-2026-52869, upgrade the MCP Python SDK to version 1.27.2 or later.
What vulnerabilities does CVE-2026-52869 expose?
CVE-2026-52869 exposes session requests routed without verifying the authenticated principal, leading to potential unauthorized access.
What are the affected components in CVE-2026-52869?
The affected components in CVE-2026-52869 are mcp.server.sse.SseServerTransport and mcp.server.streamable_http_manager.StreamableHTTPSessionManager.
When was CVE-2026-52869 published?
CVE-2026-52869 was published on July 15, 2026.