CVE-2026-59950 Details
Description
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.
A vulnerability exists in the MCP Python SDK WebSocket server transport, specifically in versions prior to 1.28.1. The issue arises because the WebSocket handshake process did not validate the Host or Origin headers, allowing any origin to connect to the server. This vulnerability is present in the deprecated 'mcp.server.websocket.websocket_server' transport, which must be manually integrated into an ASGI application, as it is not available through 'FastMCP'.
Upgrade to MCP Python SDK version 1.28.1 or later. In the updated version, the WebSocket server transport validates the Host and Origin headers before accepting a connection. If using version 1.28.1, pass a 'TransportSecuritySettings' object to enable the validation. The WebSocket transport has been removed in version 2.0, so consider migrating to the Streamable HTTP transport.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 17, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1385 | Missing Origin Validation in WebSockets | [email protected] |
| CWE-346 | Origin Validation Error | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| lfprojects mcp python sdk | < 1.28.1 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 17, 2026 | Initial Analysis | [email protected] |
| Jul 17, 2026 | CVE Modified | CISA-ADP |
| Jul 15, 2026 | New CVE Received | [email protected] |