Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain valid bearer token for server
-
DeliveryDiscover victim's active session ID
-
ExploitSend JSON-RPC with victim's session_id/Mcp-Session-Id
-
ExecutionServer routes message into victim session
-
ImpactInject messages under victim context
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Object-level authorization, IDOR prevention
|
| Exploitation Conditions | Exploitation requires (1) the target server to use the MCP Python SDK's stateful SSE transport (SseServerTransport) or stateful Streamable HTTP transport (StreamableHTTPSessionManager) - not stateless mode; (2) the server to authenticate clients with bearer tokens and serve more than one distinct principal over the same endpoint; (3) the attacker to hold their own valid bearer token accepted by that server (PR:L - authenticated); and (4) the attacker to know a victim's active session_id query-parameter value or Mcp-Session-Id header value, which is not attacker-controlled and is transient (this is the AC:H limiting factor). Limiting factors that reduce realistic risk: it is not exploitable by unauthenticated attackers, is useless against single-principal/single-tenant deployments, requires capturing or guessing a live session ID, and is fully closed by upgrading to 1.27.2. |
| Impact | The supplied CVSS 3.1 vector (AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L, base 7.1, High) is internally consistent with the description and with my independent assessment. Two factors materially constrain real-world risk: PR:L means the attacker must already possess a valid bearer token accepted by the same server (so this is an authenticated, insider or cross-tenant attack, not open-internet exploitation), and AC:H reflects that the attacker must also learn a victim's active session ID, which is not attacker-controlled and is typically transient. No EPSS score, no CISA KEV entry, and no public exploit code appear in the provided intelligence, so exploitation is theoretical rather than observed. No SSVC decision data was provided. In practice this is a legitimate multi-tenant authorization-boundary bug - dangerous in shared MCP server deployments that serve multiple distinct principals over one endpoint - but it is not a mass-exploitable, unauthenticated RCE. Priority should scale with whether you run a shared/multi-tenant MCP server exposed to more than one bearer principal; single-tenant deployments face little practical exposure. |
| Exploit ScenarioDerived | In a shared MCP server that authenticates multiple users by bearer token, a low-privileged tenant obtains a valid token of their own and learns another user's active session ID (for example from a proxy log, referrer leak, or shared infrastructure). Using their own valid token but supplying the victim's session_id / Mcp-Session-Id, they send crafted JSON-RPC messages that the server processes within the victim's session context. No public proof-of-concept is identified at time of analysis, and the network-but-high-complexity vector (attacker must hold a token and discover a live session ID) makes this an authenticated, opportunistic attack rather than a turnkey exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 15, 2026
Cross-session message injection in the MCP Python SDK (the 'mcp' package on PyPI) prior to 1.27.2 allows an authenticated client holding a valid bearer token to hijack another principal's session on the SSE and stateful Streamable HTTP transports. Because SseServerTransport and StreamableHTTPSessionManager route inbound requests using only the session_id query parameter or Mcp-Session-Id header - never checking that the caller is the same authenticated principal who created the session - any bearer-token-authenticated client who learns a victim's session ID can inject arbitrary JSON-RPC messages into that session. There is no public exploit identified at time of analysis and no CISA KEV listing; the flaw is fixed in version 1.27.2.
RemediationAI
Vendor-released patch: 1.27.2. Upgrade the 'mcp' PyPI package to version 1.27.2 or later, which binds sessions to the authenticated principal by propagating the OAuth subject through the token and session chain (per GHSA-jpw9-pfvf-9f58, PRs #2690 and #2719); this is the primary and recommended fix. If you cannot upgrade immediately, reduce exposure by avoiding shared multi-principal use of the stateful transports: run a separate server process or endpoint per authenticated principal so a session ID from one tenant cannot be replayed against another, or switch to stateless Streamable HTTP mode where feasible (trade-off: loses server-side session continuity and any features that depend on it). Additionally treat session IDs as secrets - ensure they are high-entropy, transmitted only over TLS, and never logged or leaked via Mcp-Session-Id headers or session_id parameters - but note this only raises the bar and does not close the authorization gap, since a colluding or compromised bearer client can still obtain and reuse an ID. See the release notes at https://github.com/modelcontextprotocol/python-sdk/releases/tag/v1.27.2 and the advisory at https://github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-jpw9-pfvf-9f58.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The Model Context Protocol (MCP) is a JSON-RPC-based protocol that lets LLM applications talk to tool/context servers. The Python SDK implements two long-lived, stateful HTTP transports: the legacy Server-Sent Events (SSE) transport (mcp.server.sse.SseServerTransport) and the newer Streamable HTTP transport managed by mcp.server.streamable_http_manager.StreamableHTTPSessionManager. Both maintain server-side session state keyed by a session identifier that the client echoes back on each request - via the session_id query parameter (SSE) or the Mcp-Session-Id header (Streamable HTTP). The root cause is CWE-639 (Authorization Bypass Through User-Controlled Key, an IDOR-style flaw): the session lookup trusts the client-supplied key alone and never binds the session to the authenticated OAuth/bearer principal (the RFC 7662/9068 'sub' subject) that established it. The affected component is cpe:2.3:a:modelcontextprotocol:python-sdk. The fix (PRs #2690 and #2719, commits 1abcca24 and ce267b6f) threads a 'subject' claim through the auth provider chain - AuthorizationCode, RefreshToken, and AccessToken now carry the resource-owner subject plus additional claims - so the server can associate and verify the principal that owns each session.
Know when Python Sdk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L
Attacker needs their own valid bearer token (PR:L) plus knowledge of a victim's transient, non-controllable session ID (AC:H) over the network (AV:N); injecting into another session breaches confidentiality and integrity (C:H/I:H) with limited availability impact (A:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.streamable_http_manager.StreamableHTTPSessionManager route requests to existing sessions using only the session_id 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.
Blast Radius
ecosystem impact- 284 pypi packages depend on mcp (151 direct, 138 indirect)
Ecosystem-wide dependent count for version 1.27.2.
Articles & Coverage 1
Executive ViewAI
The MCP Python SDK (versions prior to 1.27.2) allows authenticated users to impersonate other users' sessions on SSE and HTTP transports. An attacker with a valid bearer token can inject arbitrary commands into another user's session, potentially enabling unauthorized access to data and lateral movement within AI-integrated applications.
Apply vendor patch to version 1.27.2 or later.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
More in Python Sdk
View allResource-confusion in the Model Context Protocol Python SDK (pip package mcp) causes server-side bearer authentication t
Client-side server-side request forgery and denial of service in the official Model Context Protocol Python SDK: when a
Cross-origin redirect handling in the Model Context Protocol Python SDK (published on PyPI as `mcp`) leaks caller-suppli
Missing authorization in the MCP Python SDK (the `mcp` PyPI package) versions 1.23.0 through 1.27.1 lets any authenticat
Unbounded HTTP request-body buffering in the Model Context Protocol Python SDK (the 'mcp' package) before 1.29.1 and in
Cross-origin WebSocket hijacking in the Model Context Protocol Python SDK (mcp on PyPI) before 1.28.1 lets a remote web
OAuth credential disclosure in the Model Context Protocol Python SDK (pip package 'mcp', versions 1.9.1 through 1.29.1 a
Unbounded server-side memory growth in stateful Streamable HTTP servers built on the MCP Python SDK (the 'mcp' package o
EUVD-2026-44795
GHSA-jpw9-pfvf-9f58
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB