Skip to content
The Injection_
LIVE
LIVElast sweep next in--:--:--

[ RSS ][ JSON ][ llms.txt ]

opencode: a remote MCP server could run commands on Windows

opencode ran attacker code on Windows when it connected to a malicious remote MCP server, fixed in version 1.18.33.

· Pillar Security · Research by Eilon Cohen

CVE-2026-119025
MEDVulnerability

opencode ran attacker-supplied commands on Windows when a remote MCP server returned a crafted OAuth authorization endpoint. Anomaly fixed it in 1.18.33 without a CVE, and VulnCheck assigned CVE-2026-119025 on October 29, 2026.

01What happened

Pillar Security disclosed a command injection flaw in opencode, the open-source coding agent built by Anomaly. Researcher Eilon Cohen reported it privately on 2026-08-29 and published the write-up on 2026-10-19. Anomaly shipped the fix in version 1.18.33 on 2026-09-28 as a refactor, with no security advisory and no CVE. VulnCheck then published CVE-2026-119025 on 2026-10-29, rated 7.7, against the upstream open package, and listed MCP Inspector and opencode among the affected packages.

02How it works

A remote MCP server controls its own OAuth discovery document, and opencode passed that document's authorization_endpoint value straight to the open() browser launcher. On Windows, open built a PowerShell command string without escaping the URL, and PowerShell expands $(...) inside double quotes. A URL such as https://evil.test/$(...) therefore ran as code, even though the browser launch itself then failed.

03Who is affected

Windows and WSL users of opencode-ai from 1.0.137 through 1.18.32 are exposed, and only when they add a remote MCP server an attacker controls. macOS and Linux installs are not affected, per Pillar Security's FAQ. VulnCheck's advisory widens the affected set to the open package from 7.2.0 up to 11.0.0 and to MCP Inspector from 2.0.0 up to 2.12.0, so any project that passes an untrusted URL to open on Windows shares the flaw.

04What to do

Upgrade opencode to 1.18.33 or later, move MCP Inspector to 2.12.0 or later, and update any project that depends on the open package to 11.0.0 or later. Dependency scanners can now flag these versions, because VulnCheck assigned CVE-2026-119025 on 2026-10-29, so the manual version inventory the earlier advice called for is no longer the only option.

Questions people ask

Is opencode patched against the MCP OAuth command injection?
Anomaly fixed the flaw in opencode 1.18.33, published on 2026-09-28, by bumping the open dependency from 10.1.2 to 11.0.4 and routing browser launches through a shared opener that accepts only http and https URLs. Pillar Security says the dependency bump is what actually closes the hole, because the scheme check alone would not block the payload.
Am I affected if I run opencode on macOS or Linux?
macOS and Linux installs of opencode are not affected, according to Pillar Security's FAQ. The flaw depends on the open package building a PowerShell command string on Windows, where $(...) inside double quotes is expanded as code. Windows and WSL users running opencode-ai 1.0.137 through 1.18.32 are the exposed group.
Is there now a CVE for the opencode MCP OAuth flaw?
VulnCheck published CVE-2026-119025 on October 29, 2026, rated it 7.7, and assigned it to the upstream open package rather than to opencode alone. Anomaly had declined to request a CVE, taking the position that a malicious MCP server sits outside the product's threat model. Dependency scanners can now flag open below 11.0.0, MCP Inspector below 2.12.0 and opencode below 1.18.33.

Sources 5 links, all fetched

  1. 1pillar.securityPillar Security Report
  2. 2vulncheck.comVulnCheck Advisory
  3. 3github.comFix Pull Request
  4. 4github.comRelease 1.18.33
  5. 5pillar.securityMCP Inspector Write-Up