UTC
High

MCP Python SDK: WebSocket server transport does not support Host/Origin validation

CVE-2026-59950 · GHSA-vj7q-gjh5-988w · published 2026-07-16

Severity
High
CVSS score
7.6
Chance of exploitation (EPSS)
0.23%
Fixed in
1.28.1
  • Exploitation No known exploitation
  • Automatable No
  • Technical impact Total
  • CISA SSVC
What it is

A user who runs an MCP server on this transport bound to localhost or a LAN address, without a separate authentication or origin gate in front of it, and visits a malicious web page, can have that page enumerate and invoke the server's tools and read its resources. The consequences depend entirely on what the server exposes. The transport itself requires no token or prior session. Some browsers prompt before allowing a public page to open a connection to a local-network address, which adds a user-interaction step but is not a substitute for server-side validation.

What to do

Upgrade mcp to 1.28.1 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

If you cannot upgrade yet

Upgrade to version 1.28.1 or later, in which websocketserver() accepts the same optional argument as the other HTTP-based transports and validates the Host and Origin headers before accepting the handshake; a request that fails validation is rejected with HTTP 403 and ValueError("Request validation failed") is raised to the caller. As with the other transports the parameter defaults to None, which leaves validation disabled, so upgrading alone does not change behaviour: pass a TransportSecuritySettings with enablednsrebindingprotection=True and appropriate allowedhosts / allowedorigins to receive the protection.

Affected
PackageRegistryAffectedFixed in
mcpPyPI< 1.28.11.28.1
Downstream in the Official MCP Registry

22 registered MCP servers install an affected version today, by the dependency versions a fresh install resolves.

  • com.cyberspf/mcpmcp@1.9.4
  • com.nautaai/holster-mcpmcp@1.27.2
  • io.github.abhichandra21/promptheusmcp@1.12.4
  • io.github.AdonaiVera/fiftyone-mcp-servermcp@0.9.1
  • io.github.AndreySukhanov/summarix-telegrammcp@1.12.4
  • io.github.ashlesh-t/cognirepomcp@1.27.0
  • io.github.cr7258/elasticsearch-mcp-servermcp@1.9.2
  • io.github.domdomegg/time-mcp-pypimcp@1.13.1
  • io.github.gokeshenzhen/traceweavemcp@1.27.0
  • io.github.klein-business/legal-text-mcp-demcp@1.27.1
  • io.github.kushknows/weather-mcp-servermcp@1.13.1
  • io.github.luarss/openroad-mcpmcp@1.26.0
All 22 servers on the trace →

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].