Security researcher Teycir has disclosed a high-severity cross-site WebSocket hijacking vulnerability in Supergateway, an MCP (Model Context Protocol) stdio-to-network bridge. The flaw allows malicious web pages to connect to a victim’s local MCP server and execute tools with the victim’s privileges.
Quick Take
- What: CVE-2026-132121, a cross-site WebSocket hijacking vulnerability in Supergateway’s stdio-to-WebSocket mode
- Affected versions: Supergateway 2.4.0 through 4.2.2
- Attack vector: Malicious web pages can connect to ws://127.0.0.1:port/message from any origin, bypassing missing Origin header validation
- Impact: Attackers can initialize MCP sessions and invoke wrapped stdio MCP server tools (filesystem, shell, APIs) with victim privileges
- What to do: No fixed version is stated in public sources. Monitor the upstream repository for patches and consider restricting WebSocket access
In plain English
Supergateway is a developer tool that lets AI systems talk to local programs through a network connection. A security hole lets any website you visit secretly connect to your local Supergateway server and run commands on your computer as if you ran them yourself. This could let an attacker read files, run shell commands, or call APIs using your credentials.
What you should do: If you run Supergateway, watch for updates from the maintainers. If you don’t use this tool, you can ignore this issue.
What happened
On November 17, 2026, researcher Teycir published two high-severity vulnerabilities in Supergateway, including CVE-2026-132121. The researcher published GHSA advisories GHSA-96g7-x7h4-cr9v and GHSA-mw77-x7vj-mfcc under a fork repository and notified the vendor via GitHub issue #378.
CVE-2026-132121 stems from missing Origin header validation in Supergateway’s WebSocket upgrade handler. The vulnerable code in src/gateways/stdioToWs.ts (lines 104 to 126 in version 4.2.2) accepts WebSocket connections without checking the Origin header. The server accepts Origin: null and any arbitrary origin, and authentication is optional and not enabled by default.
The researcher verified the vulnerability with 12 successful exfiltrations across four origins in three runs each, including a real Chromium browser proof captured in evidence/cswsh_browser.png. A malicious web page can open a WebSocket connection to ws://127.0.0.1:port/message (where port is the gateway’s listening port, default 8000) from any origin, initialize an MCP session, and invoke tools such as filesystem access, shell commands, or API calls with the victim’s privileges.
The attack works even against localhost-bound gateways because browsers allow JavaScript on any web page to connect to localhost WebSocket endpoints. The researcher’s supergateway-security-research repository on GitHub contains working exploits, verification scripts (36 checks, all passing), captured evidence, and a proposed patch.
VulnCheck assigned CVE-2026-132121 to this vulnerability on November 18, 2026, with a CVSS v4 score of 8.6 (high severity). The NVD lists a CVSS score of 8.1. The vulnerability is classified as CWE-1385 (Missing Origin Validation in WebSockets).
Supergateway is an open-source project maintained by supercorp-ai. The project’s README states it runs MCP stdio-based servers over SSE (Server-Sent Events) or WebSockets with one command, useful for remote access, debugging, or connecting to clients when an MCP server only supports stdio.
What you should do
The public sources do not state a fixed version. The researcher’s repository includes a proposed patch that validates Origin against an allowlist during upgrade, requires an API key for upgrades, and binds to loopback by default.
Until a fixed release ships, avoid running Supergateway in stdio-to-WebSocket mode on machines where you browse the web, and turn on authentication, which the researcher notes is optional and off by default. Binding to loopback alone does not help here, because the attack runs from the victim’s own browser.
The researcher also disclosed a second flaw, an unauthenticated denial of service via a prototype-chain sessionId in stdio-to-SSE mode, now tracked as CVE-2026-131857.
What it means
CVE-2026-132121 represents a significant risk for developers and organizations using Supergateway to expose local MCP servers. The vulnerability allows cross-site attacks against localhost services, a class of attack that bypasses the same-origin policy’s usual protections because browsers treat localhost as accessible from any web context.
The flaw underscores the importance of Origin validation in WebSocket servers, especially those listening on localhost. Even when a service binds to 127.0.0.1, any web page a user visits can attempt to connect, making Origin checks a critical defense layer.
This is the second Supergateway flaw this week after CVE-2026-131857, where one request crashes the gateway. Browser based attacks on local MCP servers also hit pgEdge Postgres MCP Server through DNS rebinding. New cases are tracked in our AI Security hub.
Sources
- NVD CVE-2026-132121
- Teycir supergateway-security-research repository
- Supergateway GitHub repository
- Vulnerable code in stdioToWs.ts
- GitHub Issue #378
- VulnCheck Advisory



