Authorization Bypass Through User-Controlled Key Affecting mcp package, versions [,1.27.2)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.32% (25th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Authorization Bypass Through User-Controlled Key vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-MCP-18016318
  • published19 Jul 2026
  • disclosed16 Jul 2026
  • creditSrikanth Ramu,HE WEI

Introduced: 16 Jul 2026

NewCVE-2026-52869  (opens in a new tab)
CWE-639  (opens in a new tab)

How to fix?

Upgrade mcp to version 1.27.2 or higher.

Overview

mcp is a Model Context Protocol SDK

Affected versions of this package are vulnerable to Authorization Bypass Through User-Controlled Key in SseServerTransport and StreamableHTTPSessionManager, which look up a session by the session_id query parameter or Mcp-Session-Id header without checking that the requester's authentication context matches the principal that created the session. An attacker who obtains a session ID can inject JSON-RPC messages on that session as a different authenticated principal by supplying the session identifier, regardless of the bearer token presented. Exploitation requires the server to run the SSE or stateful Streamable HTTP transport with bearer-token authentication and the attacker to obtain a valid session ID out-of-band, such as from logs or network observation.

CVSS Base Scores

version 4.0
version 3.1