Update OpenCode and remove MCP servers you don't trust

OpenCode flaw let a malicious MCP server run PowerShell during sign-in on Windows · Security incident · News · thehackernews · Oct 22, 2026

What happened

The Hacker News reported on 22 Oct that OpenCode on Windows and WSL passed the sign-in address supplied by an MCP server into a PowerShell command without escaping it, so a malicious or hijacked server could run code with the developer's own access when they ran opencode mcp auth. Pillar Security, which found it, rates it critical (proposed 9.8). Anomaly fixed it in 1.18.33 on 28 Sep but requested no CVE or advisory, so scanners will not flag builds from 1.0.137 to 1.18.32. macOS and Linux are not affected, and no attacks have been reported.

How to prevent it

Only connect your agent to MCP servers you trust and keep the agent updated, because a fix may ship without any security notice. Remove remote servers you no longer use. See our common AI security mistakes.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I use an AI coding agent that connects to MCP servers, possibly OpenCode on Windows or WSL. Help me check my setup. 1) Tell me how to find which version of OpenCode I run and whether it is older than 1.18.33 (affected versions are 1.0.137 to 1.18.32, Windows and WSL only). 2) Show me how to list every MCP server my agents are connected to (for OpenCode that is the command opencode mcp list), and which of them are remote servers I don't run myself. 3) Help me decide which servers I can remove, and how to remove them from my config. 4) Explain how to check that each remaining server's domain is still owned by the company I think it is. 5) Remind me to be careful when an agent asks me to sign in to an MCP server. Don't change anything until I've approved your plan. Never ask me to paste API keys, passwords or .env contents; tell me where to check them myself.

Why this keeps happening: trusting agents & ai input

An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.

A quick checklist before you ship

More on this: every trusting agents & ai input story and our related guide.

Tools involved

OpenCode stories, MCP stories, Windows stories

Related stories

Source: original post on News ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.