Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. mcp
  4. ›
  5. CVE-2026-59950

CVE-2026-59950: MCP Python SDK: WebSocket server transport does not support Host/Origin validation

July 16, 2026

In affected versions, the deprecated WebSocket server transport (mcp.server.websocket.websocket_server) accepted the WebSocket handshake without applying any Host or Origin header validation. The TransportSecuritySettings mechanism that the SSE and Streamable HTTP transports use for this purpose was not wired into the WebSocket transport, so there was no SDK-level way to restrict which origins could connect.

References

  • github.com/advisories/GHSA-vj7q-gjh5-988w
  • github.com/modelcontextprotocol/python-sdk/commit/777b8d06710c140e3606b0d4598e2aa48546c266
  • github.com/modelcontextprotocol/python-sdk/pull/2992
  • github.com/modelcontextprotocol/python-sdk/releases/tag/v1.28.1
  • github.com/modelcontextprotocol/python-sdk/security/advisories/GHSA-vj7q-gjh5-988w
  • nvd.nist.gov/vuln/detail/CVE-2026-59950

Code Behaviors & Features

Detect and mitigate CVE-2026-59950 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.28.1

Fixed versions

  • 1.28.1

Solution

Upgrade to version 1.28.1 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-1385: Missing Origin Validation in WebSockets
  • CWE-346: Origin Validation Error

Source file

pypi/mcp/CVE-2026-59950.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:19:23 +0000.