OpenCode Flaw Lets Malicious MCP Servers Execute Code During Sign-In on Windows and WSL
A flaw in an AI coding agent let malicious servers run code on a developer's machine during sign-in, a problem fixed in a recent update.
Overview
A security flaw in the OpenCode AI coding agent allowed a malicious or hijacked MCP serverA computer or program on a network that stores data and responds to requests from client devices to execute code on a developer's machine during the sign-in process. This issue affected users on Windows and the Windows Subsystem for Linux, where the software passed a web address to a helper that opened it in a browser. The helper built a PowerShell command around that address without escaping it, so an address written to carry a command would run that command. The code executed with the developer's own access, meaning the attacker could perform actions the user was authorized to do. Anomaly, the company behind OpenCode, fixed the flaw in version 1.18.33 on September 28, but did not request a CVEThe public tracking code assigned to a specific known security flaw in software or hardware or publish a security advisoryAn official bulletin from a vendor or agency warning users about a flaw and its fix. Because there is no CVE, vulnerabilityA flaw in software or hardware that lets an attacker do something the maker did not intend scannersUsing automated tools to probe computers, networks, or code for known security flaws and missing patches will not flag the builds still at risk, which range from 1.0.137 through 1.18.32.
Terms in this story
- server
- A computer or program on a network that stores data and responds to requests from client devices. Online stores, email systems, and multiplayer games all run on servers in data centers or the cloud, making unpatched servers a primary target for intruders.
- shell
- The command-line interpreter program that accepts text commands and runs them on an operating system. When an attacker exploits a web server and pops a shell, they can type operating system commands directly as if they were sitting at the server's keyboard.
- CVE
- The public tracking code assigned to a specific known security flaw in software or hardware. Every cataloged software flaw gets a unique CVE label so security teams, vendors, and news reports can talk about the exact same bug without confusion. Security+ objective 2.3 lists the term
- security advisory
- An official bulletin from a vendor or agency warning users about a flaw and its fix. When a bug is patched, the vendor publishes a security advisory listing affected versions, the CVE code, the severity rating, and instructions for updating.
- vulnerability
- A flaw in software or hardware that lets an attacker do something the maker did not intend. Security advisories report a vulnerability when researchers or attackers find a coding mistake in an app or server that allows someone to break in or crash it. Security+ objective 2.3 lists the term
- scanners
- Using automated tools to probe computers, networks, or code for known security flaws and missing patches. Both defenders and attackers run vulnerability scanning across internet-facing servers to find out which machines are still running outdated software versions. Security+ objective 4.3 lists the term
- MCP Servers
- A connector program that gives an AI assistant access to a specific database, file system, or web API. When a developer connects an AI agent to an MCP server, a bug or malicious prompt in that connector can let the agent run unintended shell commands or read private files.
- Model Context Protocol
- An open standard for connecting AI assistants to external data sources, files, and software tools. Software teams use the Model Context Protocol so an AI coding tool or chatbot can query databases and run local commands, which makes securing those tool connections a major concern.
- Protocol
- An agreed set of rules and message formats that computers follow to exchange data over a network. Every internet service relies on a network protocol such as HTTP for web pages or DNS for domain lookups, and a logic flaw in a protocol's design affects every vendor that implements it.
- OAuth
- An open standard that lets one app use another service without sharing your password. When you click a button to sign in with an existing account or let a calendar app read your schedule, OAuth issues an access token without sharing your password. Security+ objective 4.6 lists the term
- authorization
- Checking whether an already logged-in user or program has permission to perform a specific action. Authentication checks who you are at the front door, while authorization decides whether your student account is allowed to read only your own grades or edit the class roster.
- endpoint
- Any user device or server, such as a laptop, phone, or workstation, connected to a network. Security teams install monitoring tools on every company endpoint because a single employee laptop infected at home can carry malware onto the corporate network.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the The Hacker News website. Cite the article, not this page.
Read the full article on The Hacker News (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"A flaw in the OpenCode AI coding agent allowed a malicious or hijacked MCP server to run code..." Found by reading the article; these exact words are in it - Who is affected: "...developers windows or wsl machine..." Organizations using the product
Copied word for word from the article - Security+ 2.3 Explain various types of vulnerabilities.
"OpenCode Flaw Lets Malicious MCP Servers Execute Code During..." Found in the headline - Security+ 4.6 Given a scenario, implement and maintain identity and access management.
"......Lets Malicious MCP Servers Execute Code During Sign-In on Windows and WSL..." Found in the headline - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"A flaw in the OpenCode AI coding agent allowed a malicious or hijacked..." Found in the opening sentences - CYBR 101 week 7: Linux, Windows, permissions and firewalls
"......MCP Servers Execute Code During Sign-In on Windows and WSL..." Found in the headline - CYBR 101 week 8: networks, ports, DNS and packets
"......in. OpenCode connects to MCP (Model Context Protocol) servers to add outside tools, and..." Found in the opening sentences
How a story is connected to the course, and every objective, week and job role