OpenCode's Unauthenticated HTTP Server Allows Arbitrary Command Execution
CVE-2026-22812 · GHSA-vxw4-wv6m-9hhh · published 2026-01-13
- Severity
- High
- CVSS score
- 8.8
- Chance of exploitation (EPSS)
- 16.5%
- Fixed in
- 1.0.216
- Exploitation Public proof of concept
- Automatable No
- Technical impact Total
- CISA SSVC
Remote Code Execution via two vectors: 1. Local process: Any malicious npm package, script, or compromised application can execute commands as the user running OpenCode. 2. Browser-based (confirmed in Firefox): Any website can execute commands on visitors who have OpenCode running. This enables drive-by attacks via malicious ads, compromised websites, or phishing pages. With --mdns flag, the server binds to 0.0.0.0 and advertises via Bonjour, extending the attack surface to the entire local network. Code analysis, CVSS scoring, and documentation assisted by Claude AI (Opus 4.5).
Upgrade opencode-ai to 1.0.216 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| opencode-ai | npm | < 1.0.216 | 1.0.216 |
- CriticalMarimo: Pre-Auth Remote Code Execution via Terminal WebSocket Authentication BypassmarimoExploited
- CriticalLangflow CORS misconfiguration enables Account Takeover and RCElangflowExploited
- HighLiteLLM: MCP Authentication Bypass via OAuth2 Passthrough FallbacklitellmExploited
- HighLangflow: IDOR Vulnerability in `/api/v1/responses` Endpoint Allows Authenticated Attackers to Access Another User's FlowlangflowExploited
- CriticalTodoist MCP Server: Browser DNS rebinding lets websites write and delete Todoist data through local MCP server@doist/todoist-mcp
- CriticalLangflow: Unauthenticated Flow Execution via Webhook Authentication Bypasslangflow
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.