Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAttacker hosts malicious web page
-
DeliveryVictim browser loads the page
-
ExploitScript opens cross-origin WebSocket to local MCP server
-
ExecutionHandshake accepted without Origin/Host check
-
ImpactDrive MCP tool calls to read/exfiltrate data
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
|
| Exploitation Conditions | Exploitation requires that the target application expose the deprecated mcp.server.websocket.websocket_server transport from mcp < 1.28.1 (applications using only SSE or Streamable HTTP transports are not affected). The attacker cannot connect directly server-to-server in the general case: the CVSS UI:P/AT:P metrics indicate a victim must load attacker-controlled content in a browser that then performs a cross-origin (and/or DNS-rebinding) WebSocket handshake to the MCP endpoint, which the server accepts with no Host or Origin validation. Limiting factors: only the deprecated WebSocket transport is vulnerable; the MCP server must be network-reachable from the victim's browser (commonly a localhost/loopback binding); user interaction (visiting the malicious page) is required; and even after patching, protection is only active if the operator passes TransportSecuritySettings, since the default remains permissive for backward compatibility. |
| Impact | The supplied CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N, score 7.6) captures the shape of this well: network reachable and unauthenticated (PR:N), but gated by an attack requirement (AT:P) and passive user interaction (UI:P) - i.e., a victim must load attacker content in a browser, and the target must run the specific deprecated transport. High confidentiality and integrity impact (VC:H/VI:H) reflect that a hijacked MCP session can read and invoke tools. This is not a wormable, drive-by unauthenticated RCE despite the network vector; the AT:P and UI:P conditions meaningfully constrain it. No EPSS score, no KEV listing, and no POC were provided, so real-world exploitation pressure appears low-to-moderate and opportunistic rather than mass-scale. Note a scope nuance: the practical impact lands on the application's own MCP tools rather than the SDK's process privileges, so downstream severity depends heavily on what tools the exposed server offers. Prioritize based on whether you actually use the deprecated WebSocket transport - most deployments on SSE/Streamable HTTP are unaffected. |
| Exploit ScenarioDerived | A developer runs an MCP-enabled application that exposes the deprecated websocket_server transport on localhost. The developer visits an attacker-controlled web page, whose JavaScript opens a cross-origin WebSocket to ws://127.0.0.1:<port>/ws with subprotocol 'mcp'; because no Origin check is applied, the handshake succeeds and the page drives MCP tool calls to read data or trigger actions. No POC was provided, and the passive user interaction plus DNS-rebinding-style attack requirement (UI:P/AT:P) mean the attacker must lure the victim's browser rather than hit the server directly. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 15, 2026
Cross-origin WebSocket hijacking in the Model Context Protocol Python SDK (mcp on PyPI) before 1.28.1 lets a remote web page connect to any application exposing the deprecated mcp.server.websocket.websocket_server transport, because that transport accepted handshakes without Host or Origin validation and offered no SDK-level control to restrict connecting origins. A malicious site loaded in a victim's browser can therefore open an MCP session against a locally reachable server and drive its tools. There is no public exploit identified at time of analysis, and the issue is not listed in CISA KEV; the tags flag it as information disclosure.
RemediationAI
Vendor-released patch: 1.28.1 - upgrade the mcp PyPI package to 1.28.1 or later (pip install --upgrade 'mcp>=1.28.1'). After upgrading, explicitly pass security_settings to websocket_server using TransportSecuritySettings(enable_dns_rebinding_protection=True, allowed_hosts=[...], allowed_origins=[...]) so Host/Origin validation is actually enforced, since the default still accepts any origin to preserve backward compatibility (as the added test test_ws_security_default_settings confirms). If you cannot upgrade immediately, the strongest compensating control is to stop using the deprecated WebSocket transport and migrate to the Streamable HTTP or SSE transports, which already support TransportSecurityMiddleware; alternatively, place a reverse proxy in front of the endpoint that rejects WebSocket handshakes whose Origin is not in an allowlist and validates the Host header (trade-off: adds proxy configuration and can break legitimate clients if the allowlist is too narrow), and bind the server strictly to loopback with host firewall rules to limit reachability (trade-off: prevents intended remote clients). See the fix in PR #2992 (https://github.com/modelcontextprotocol/python-sdk/pull/2992) and commit 777b8d06710c140e3606b0d4598e2aa48546c266.
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 standard for connecting LLM clients to tool/resource servers, and the mcp package is its reference Python implementation offering several server transports (Streamable HTTP, SSE, and the now-deprecated raw WebSocket transport). The SSE and Streamable HTTP transports route requests through TransportSecurityMiddleware (TransportSecuritySettings with allowed_hosts/allowed_origins and DNS-rebinding protection), but websocket_server bypassed this layer entirely. The root cause is CWE-346 (Origin Validation Error): the WebSocket handshake was accepted regardless of the Host or Origin header, so a browser on any origin could establish a session. The PR #2992 fix threads a security_settings parameter into websocket_server and calls security.validate_request(...) before accepting the handshake, rejecting mismatched Host/Origin with an HTTP 403 pre-accept close. The affected component is cpe:2.3:a:modelcontextprotocol:python-sdk:*.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Network-reachable and unauthenticated (PR:N), but AC:H and UI:R reflect the required cross-origin/DNS-rebinding setup and a victim loading attacker content; high C/I on hijacked MCP tools, no availability impact.
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.28.1, the deprecated mcp.server.websocket.websocket_server transport accepted WebSocket handshakes without applying Host or Origin header validation, leaving no SDK-level way to restrict which origins could connect to applications that exposed that transport. This issue is fixed in version 1.28.1.
Articles & Coverage 1
Executive ViewAI
The Model Context Protocol (mcp) Python SDK contains a cross-origin WebSocket hijacking vulnerability affecting versions before 1.28.1; malicious websites can hijack MCP sessions and execute arbitrary tools against locally running servers. Organizations deploying vulnerable mcp versions expose tool execution capabilities to browser-based attacks requiring no authentication to the server. A vendor patch is available.
Apply vendor patch: upgrade mcp to version 1.28.1 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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Python Sdk
View allCross-session message injection in the MCP Python SDK (the 'mcp' package on PyPI) prior to 1.27.2 allows an authenticate
Resource-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
Unbounded server-side memory growth in stateful Streamable HTTP servers built on the MCP Python SDK (the 'mcp' package o
EUVD-2026-44798
GHSA-vj7q-gjh5-988w
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB