OpenCode: How a Malicious MCP Server Runs Code on Windows During OAuth Login (Proposed CVSS 9.8, No CVE)

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-10-24 | By: Carlos Montiel | Reading time: ~5 minutes
OpenCode: How a Malicious MCP Server Runs Code on Windows During OAuth Login (Proposed CVSS 9.8, No CVE)

Pillar Security went public on October 19 with a critical flaw in OpenCode, Anomaly's coding agent: during OAuth login against a remote MCP server, the URL the server supplies ended up inside a PowerShell command unescaped. The patch shipped on September 28, but with no CVE and no security advisory.

How the Flaw Works

When a developer authenticates OpenCode against a remote MCP server that uses OAuth, it's the server itself that supplies the “authorization endpoint,” the URL the user is sent to. On Windows and WSL, OpenCode passed that URL to the open helper package to launch the browser. According to Pillar, that helper built a PowerShell command around the URL without escaping special characters; a URL crafted with PowerShell syntax would then run the command with the developer's privileges.

One important detail: the malicious payload can travel inside a seemingly normal HTTPS address, so the usual scheme check (http/https only) doesn't block it. What closed the hole was updating the library, not filtering the URL.

Affected versions : OpenCode 1.0.137 through 1.18.32 Fixed version : 1.18.33 (September 28, 2026) Platforms : Windows and WSL (macOS and Linux not affected) Severity : critical, proposed CVSS 9.8 (by the researchers) CVE / advisory : none Exploitation : no public evidence Trigger : starting the OAuth login (e.g. "opencode mcp auth")

The Underlying Problem: A Patch With No Label

Pillar reported the finding privately on August 29 and disclosed it on October 19. Anomaly fixed it on September 28 in a change described as a browser-launch refactor; neither that change nor the release notes mention a vulnerability. According to the outlets that covered the case, the company responded that user-configured MCP servers sit “outside its trust boundary” and that a malicious server is outside its threat model.

The practical consequence: with no CVE, vulnerability scanners won't flag affected installs. Anyone relying only on a CVE-based inventory won't find out.

A Flaw With History

The root cause is a known one. The command-injection risk in the open package on Windows was reported in 2023 and fixed in its version 11; OpenCode had stayed on an earlier version. A very similar pattern already produced CVE-2025-6514 in the mcp-remote proxy in 2025. It's the same lesson as in other agent incidents: data handed over by a remote server (here, a URL) is treated as trusted and ends up in a command interpreter.

Clarification: this flaw is separate from the breach reported independently in OpenCode's hosted console, which may have exposed some users' API keys. Here the flow is the reverse: a hostile MCP server runs code on the developer's machine.

What to Do in a Company

1) Inventory who uses OpenCode on Windows or WSL and move everyone to 1.18.33 or later. 2) Run opencode mcp list and remove any remote MCP servers nobody has reviewed. 3) Maintain an approved list of MCP servers: a domain that changes hands or a compromised server can serve the malicious URL long after you added it. 4) Don't rely on CVEs alone: ask vendors of AI developer tools to communicate security patches as such.

For anyone buying or adopting coding agents: an agent's trust boundary includes every MCP server it connects to, not just the model. Before approving a tool, ask how it handles its vulnerabilities (advisories, CVEs, patch window). A silent fix leaves security teams blind. If you need to define an MCP policy for your company, write to info@guatemalia.com.

Sources: Pillar Security (October 19 disclosure), The Hacker News, Infosecurity Magazine.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com