GHSA-vj7q-gjh5-988w: MCP Python SDK: WebSocket server transport does not support Host/Origin validation
- Identifiers
- CVE-2026-59950GHSA-vj7q-gjh5-988w
- Published
- Record updated
- Affected
- mcp < 1.28.1
- Fixed in
- 1.28.1
- released June 26, 2026, 20 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.2%
Summary
The deprecated WebSocket server transport, mcp.server.websocket.websocket_server, in the MCP Python SDK accepted WebSocket handshakes without validating the Host or Origin headers, because TransportSecuritySettings was never wired into it. A malicious web page can open a connection to an exposed server on this transport, complete initialize, and invoke its tools and read its resources, and the transport requires no token or prior session. Only applications that wire this transport into their own ASGI server are affected.
Mitigation
Upgrade to version 1.28.1 or later, which adds the optional security_settings: TransportSecuritySettings argument and validates Host and Origin headers, rejecting failed requests with HTTP 403 and ValueError("Request validation failed"). The parameter defaults to None, which leaves validation disabled, so pass a TransportSecuritySettings with enable_dns_rebinding_protection=True and appropriate allowed_hosts / allowed_origins. The recommended path is to migrate to Streamable HTTP, where FastMCP enables this protection automatically for localhost binds. The WebSocket transport has been removed entirely in v2.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- mcpPyPILLM dependency since 2024-11-20 · 62 tracked dependents
Topics
Related items
- MediumFamiliar weaknesses, exploited faster: defending against agentic cyber attacksSimilar attack · UK NCSC
- MediumHackers Exploit N-able MailAssure Flaw While AI Agents Exploit MONAI Label Zero-DaySimilar attack · The Hacker News
- HighCVE-2026-133448: AutoGPT Claude Code CLI prompt preprocessing bypasses tool allow-listSimilar attack · NVD/CVE Database
- CriticalCVE-2026-118285: Azure Machine Learning server-side request forgery allows privilege elevationSimilar attack · NVD/CVE Database
- HighCVE-2026-130164: Hermes Agent code execution via screen environment file mergeSimilar attack · NVD/CVE Database