Skip to main content

MCP Python SDK EUVDEUVD-2026-44795

| CVE-2026-52869 HIGH
Authorization Bypass Through User-Controlled Key (CWE-639)
2026-07-15 GitHub_M GHSA-jpw9-pfvf-9f58
7.1
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain valid bearer token for server
  2. Delivery
    Discover victim's active session ID
  3. Exploit
    Send JSON-RPC with victim's session_id/Mcp-Session-Id
  4. Execution
    Server routes message into victim session
  5. Impact
    Inject 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

python-sdk < 1.27.2

Affected Packages

pypi mcp fix: 1.27.2
euvd python_sdk fix: 1.27.2

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

Vendor (GitHub_M) PRIMARY 7.1 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L
vuln.today AI 7.1 HIGH

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).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

Lifecycle Timeline

2
Patch available
Jul 15, 2026 - 22:33 EUVD
CVE Published
Jul 15, 2026 - 20:06 cve.org
HIGH 7.1

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 284 pypi packages depend on mcp (151 direct, 138 indirect)

Ecosystem-wide dependent count for version 1.27.2.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch to version 1.27.2 or later.

Threat Intelligence Overview

EPSS Score
0.3%
Top 84% exploitable
Prevalence
Medium
official Python MCP SDK, fast-growing but exposure limited to multi-tenant HTTP deployments
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy