CVE-2026-59950
Analyzed Analyzed - Analysis Complete

MCP Python SDK WebSocket Origin Validation Bypass

Vulnerability report for CVE-2026-59950, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-15

Last updated on: 2026-07-17

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-15
Last Modified
2026-07-17
Generated
2026-08-05
AI Q&A
2026-07-16
EPSS Evaluated
2026-08-03
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
lfprojects mcp_python_sdk to 1.28.1 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-346 The product does not properly verify that the source of data or communication is valid.
CWE-1385 The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

The MCP Python SDK before version 1.28.1 has a vulnerability in its deprecated WebSocket transport (mcp.server.websocket.websocket_server). It fails to validate Host or Origin headers during WebSocket handshakes, allowing any origin to connect to applications using this transport. This could enable unauthorized access or interactions with the SDK.

Detection Guidance

The vulnerability involves the MCP Python SDK's WebSocket transport not validating Host or Origin headers. To detect it, check if any applications using mcp versions before 1.28.1 expose the deprecated websocket_server transport. Inspect network traffic for unvalidated WebSocket connections to this transport.

Impact Analysis

This vulnerability could allow attackers to connect to your MCP Python SDK application via WebSocket without proper origin restrictions. This may lead to unauthorized data access, manipulation, or disruption of services if the application processes untrusted input.

Compliance Impact

This vulnerability could violate compliance requirements that mandate strict access controls and data protection, such as GDPR's principle of data protection by design or HIPAA's access controls. Unauthorized connections may lead to data breaches or unauthorized processing.

Mitigation Strategies

Upgrade the MCP Python SDK to version 1.28.1 or later to apply Host and Origin header validation. If upgrading is not possible, disable the deprecated websocket_server transport in affected applications to prevent unauthorized WebSocket connections.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-59950. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart