Missing Origin Validation in WebSockets Affecting mcp package, versions [,1.28.1)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (5th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-MCP-18016320
  • published19 Jul 2026
  • disclosed16 Jul 2026
  • creditNitish Yaddala,Nadav,KairoKid,Aleksandr Kovalko,u-ktdi

Introduced: 16 Jul 2026

NewCVE-2026-59950  (opens in a new tab)
CWE-1385  (opens in a new tab)
CWE-346  (opens in a new tab)

How to fix?

Upgrade mcp to version 1.28.1 or higher.

Overview

mcp is a Model Context Protocol SDK

Affected versions of this package are vulnerable to Missing Origin Validation in WebSockets in the deprecated websocket_server() transport function, which builds a Starlette WebSocket and calls accept(subprotocol='mcp') without inspecting the connection's Host or Origin headers. An attacker can open a WebSocket to a reachable MCP server from a page of any origin and issue JSON-RPC requests on the resulting session, enumerating and invoking tools and accessing resources, by luring a victim to an attacker-controlled webpage while the server runs.

CVSS Base Scores

version 4.0
version 3.1