Skip to main content

Snyk agent scan: MCP Python SDK: WebSocket server transport does not support Host/Origin validation (CVE-2026-59950)

0
High
Published: 08/13/2026 (08/13/2026, 17:35:48 UTC)
Source: GCVE Database
Product: snyk-agent-scan

Description

The MCP Python SDK's deprecated WebSocket server transport does not validate Host or Origin headers during the WebSocket handshake, allowing any web page to connect and issue JSON-RPC requests if the server is exposed without additional protections. This affects applications that explicitly use the deprecated websocket_server transport, which is not part of the MCP specification and must be manually integrated. The vulnerability can lead to unauthorized enumeration and invocation of server tools and resource access depending on the server's exposure. The issue is fixed in version 1.28.1 by adding optional Host and Origin validation, but upgrading alone does not enable validation unless configured. The recommended mitigation is to migrate away from the deprecated transport to Streamable HTTP, which enforces these protections automatically. The WebSocket transport is removed entirely in version 2.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

Homebrewmore threats →ghsa
snyk-agent-scan
pkg:brew/snyk-agent-scan
Affected versions
>=0.4.3 <0.5.17

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/22/2026, 17:28:27 UTC

Technical Analysis

In affected versions (>=0.4.3 <0.5.17) of the MCP Python SDK, the deprecated WebSocket server transport (mcp.server.websocket.websocket_server) accepts WebSocket handshakes without validating the Host or Origin headers. Unlike other transports that use TransportSecuritySettings for validation, this transport immediately accepts connections, allowing cross-origin web pages to establish sessions and issue JSON-RPC requests without authentication or origin checks. This can expose server tools and resources if the server is bound to localhost or LAN and lacks additional access controls. The vulnerability is addressed in version 1.28.1 by adding support for TransportSecuritySettings validation in the WebSocket transport, rejecting invalid requests with HTTP 403. However, validation is disabled by default and must be explicitly enabled. The best practice is to migrate to Streamable HTTP transport, which enforces these protections automatically. The deprecated WebSocket transport is removed in version 2.

Potential Impact

An attacker can use a malicious web page to connect to an MCP server using the deprecated WebSocket transport without authentication or origin validation, potentially enumerating and invoking server tools and accessing resources exposed by the server. The impact depends on what the server exposes. Browsers may prompt users before allowing connections to local network addresses, but this is not a substitute for server-side validation. This vulnerability can lead to unauthorized access and control over the MCP server's exposed functionality.

Mitigation Recommendations

Upgrade to MCP Python SDK version 1.28.1 or later, which adds optional Host and Origin header validation to the deprecated WebSocket transport. To enable protection, pass a TransportSecuritySettings object with enable_dns_rebinding_protection set to true and configure allowed_hosts and allowed_origins appropriately. Simply upgrading without enabling validation does not mitigate the issue. The recommended mitigation is to migrate off the deprecated WebSocket transport to the Streamable HTTP transport, where FastMCP automatically enforces these security checks. Note that the WebSocket transport is removed entirely in version 2, so migration is advised.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-snyk-agent-scan-CVE-2026-59950
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ada44e64d27ba8daa6a52af

Added to database: 10/22/2026, 17:16:22 UTC

Last enriched: 10/22/2026, 17:28:27 UTC

Last updated: 10/22/2026, 17:28:27 UTC

Views: 1

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses