Security fix
This release addresses GHSA-vrxg-gm77-7q5g reported by @dodge1218.
What was wrong
HTTP transports (sse, streamable-http) emitted Access-Control-Allow-Origin: * unconditionally, allowing any cross-origin browser page to open an unauthenticated MCP session and invoke the PowerShell tool. There was also no Host header validation, leaving localhost-bound servers open to DNS rebinding attacks.
What changed
- No wildcard CORS by default.
OptionsMiddlewareandCORSMiddlewareno longer emitAccess-Control-Allow-Origin: *. Without an explicit origin list, no CORS headers are sent — browsers block cross-origin requests via Same-Origin Policy. --cors-originsopt-in. Operators who need a browser-based MCP client can pass a comma-separated list of trusted origins (--cors-origins https://my-client.example.com). Only those origins receive CORS headers. Also available asWINDOWS_MCP_CORS_ORIGINSenv var andcors_originsin~/.windows-mcp/config.toml.- DNS rebinding protection.
TrustedHostMiddlewareis now applied automatically based on the bind address (loopback →localhost/127.0.0.1/[::1]; specific host → that host). Requests whoseHostheader doesn't match are rejected before reaching the MCP control plane.
Upgrade
uvx windows-mcp@0.7.5 serve
# or
pip install --upgrade windows-mcpNo configuration changes are required for the default stdio transport or for existing HTTP deployments that don't rely on cross-origin browser access.