Vulnerability critical
CVSS 3.1
critical
9.8/10

CVE-2025-6514: opencode on Windows and WSL: A Remote MCP Server's OAuth authorization_endpoint Ran PowerShell on Connect, Fixed Quietly in 1.18.33 With No Advisory or CVE

CVE-2025-6514 is a critical-severity remote code execution issue (CVSS 3.1 9.8) in opencode-ai, a MCP server. Affected: >=1.0.137 <1.18.33. Fixed in 1.18.33.

Is opencode-ai running on your developers' machines? Anomity finds every device with this MCP server installed, shows the version, and can block it by policy. Detect this across your developers' devices with Anomity →

Key facts

ID
CVE-2025-6514
Severity
critical
CVSS score
9.8 (v3.1)
Attack type
Remote code execution, Command injection
Component
opencode-ai · MCP server
Package
opencode-ai
Known exploited
No known exploitation
Published
Last verified

What is CVE-2025-6514?

Pillar Security (Eilon Cohen) disclosed on 4 October 2026 a remote code execution flaw in opencode (opencode-ai on npm) on Windows and WSL. When a remote MCP server asks for authorization, the client runs OAuth discovery and opens the authorization_endpoint the server supplies in the browser. opencode 1.0.137 to 1.18.32 passed that string, with no scheme or origin check, to the open package pinned at 10.1.2, which on Windows builds a PowerShell -EncodedCommand line without escaping the target. PowerShell expands $(...) inside double-quoted strings, so an ordinary https:// URL carrying a subexpression runs code during the automatic handshake, with no prompt injection and no further user action. Scheme validation does not stop it, including the MCP TypeScript SDK's javascript:/data:/vbscript: denylist and the scheme check opencode itself added; what closed it was upgrading open to 11.0.4, which single-quotes the target. Pillar reported privately on 29 August. The fix (PR 51414, released in 1.18.33 on 28 September) shipped as a refactor, and the vendor, Anomaly, published no advisory and requested no CVE, saying malicious MCP servers are outside its threat model, so scanners and dependency bots will not flag affected installs. A server that was harmless when configured can deliver the payload later, after a compromise, a hijacked registry entry or an expired domain. macOS and Linux are not affected. Pillar proposes CVSS 3.1 9.8; the defect class is the same as CVE-2025-6514 in mcp-remote.

Affected versions

AffectedFixed in
>=1.0.137 <1.18.331.18.33

Am I affected by CVE-2025-6514?

You are affected if you run opencode-ai >=1.0.137 <1.18.33. Versions 1.18.33 and later include the fix.

How do I fix CVE-2025-6514?

Upgrade opencode to 1.18.33 or later (1.19.3 was current on 19 October 2026) on every Windows and WSL machine, and inventory installs directly, because there is no CVE for scanners to match. Until a machine is upgraded, remove remote MCP servers you have not vetted from its opencode config. If you build an MCP client, launch the browser with an argument vector rather than a shell command line, use open 11.x or later, and bind OAuth discovery to the origin of the configured server; a scheme allowlist on its own is not enough.

How do I find every machine running opencode-ai?

Anomity inventories the AI agents, MCP servers, IDE extensions and skills on each developer device, so you can see which machines run opencode-ai and which version, then enforce a policy on it.

References