Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

NewsResearch

OpenCode on Windows: a remote MCP server could run commands on a developer's machine at sign-in, fixed quietly with no CVE

Eilon Cohen of Pillar Security disclosed a command injection in OpenCode, the open-source coding agent maintained by Anomaly, affecting versions 1.0.137 through 1.18.32 on Windows and WSL. When a developer signs in to a remote MCP server, the server's OAuth discovery document names the authorization endpoint, and OpenCode handed that URL to an old version of the open package, which places it unescaped inside a PowerShell command. A plain https URL with a PowerShell subexpression in it therefore runs commands as the developer, and passes a check that only allows http and https. The server does not have to start out malicious: one taken over later, or a domain that changes hands, works too. Pillar reported it privately on August 29 and proposes a CVSS score of 9.8. Anomaly fixed it in 1.18.33 on September 28 by updating open and adding scheme checks, but presented the change as a refactor, published no advisory and declined to request a CVE, saying malicious MCP servers are outside its threat model. Pillar reported no sign of exploitation.

Why it matters

Without a CVE, scanners and dependency bots will not flag old OpenCode installs, so find them yourself. Update OpenCode to 1.18.33 or later on Windows and WSL, and remove remote MCP servers you have not vetted; anything a server sends, sign-in URLs included, is untrusted.

Sources

Read it with the rest of the news in the Learning Center