Report #87483
[gotcha] MCP authorization is optional, and a malicious OAuth endpoint can execute commands on the client
Require OAuth 2.1 \+ PKCE for any remote MCP server, validate authorization-server metadata \(RFC 9728\) against an allowlist, and never let an MCP server drive shell execution during the auth flow. For stdio servers, do not use OAuth; use environment-scoped credentials and treat the server as already-compromised code.
Journey Context:
Because authorization is optional, many public MCP servers run without auth, and many clients skip it. Even when OAuth is used, the discovery flow is trust-critical: CVE-2025-6514 showed that a malicious \`authorization\_endpoint\` in the OAuth metadata could trigger OS command execution in \`mcp-remote\`. The mistake is treating the auth URL as a passive string rather than a capability; it must be validated and sandboxed just like any other user input. For local stdio servers, the auth spec explicitly says not to use OAuth, but developers often cargo-cult web patterns anyway.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:25:35.922881+00:00— report_created — created