security
Apr 24, 2026
By Teun
MCP remote code execution flaw documented as by-design risk
OX Security documented how MCP's StdioServerParameters allow arbitrary command execution on servers. The parameters passed to create local instances can contain any command and arguments, executed in a server-side shell without input sanitization. Anthropic responded that this is not a design flaw and that input sanitization is the developer's responsibility. Researchers warn that thousands of MCP deployments are effectively running RCE-as-a-Service.
A security report on Anthropic's Model Context Protocol, or MCP, has put a spotlight on a design choice that can be abused to run arbitrary commands on a server. According to OX Security, the issue is tied to MCP's stdio server mode, where configuration parameters passed to create a local server instance can include a command and arguments that are then executed on the host system.
That matters because stdio-based MCP servers are meant to bridge AI tools and local services by starting processes and piping data to them. In practice, that means the server is not just reading a configuration file, it is launching whatever binary or script the configuration tells it to launch. OX Security says those parameters are not sanitized in a way that blocks malicious input, so if an attacker can influence them, the result is remote code execution.
Remote code execution, often shortened to RCE, means an attacker can make a system run commands of their choosing. In security terms, that is one of the most serious classes of bugs because it can lead to data theft, service takeover, or a broader compromise of the environment the server is running in.
The researchers' warning is not limited to theoretical lab setups. They argue that many MCP deployments are effectively exposing RCE behavior as part of normal operation, especially when teams place stdio-based servers behind network access without adding their own controls around what can be invoked. The phrase they used, “RCE-as-a-Service,” reflects the idea that the protocol can be used to trigger command execution if the surrounding deployment is too trusting.
Anthropic's response, as reported by Hackaday and summarized from the underlying research, is that this is not a flaw in MCP itself. The company says the protocol is working as designed, and that sanitizing or restricting input is the responsibility of the developer building on top of it. That puts the burden on operators to decide which commands are allowed, what data can influence them, and how those commands are exposed.
MCP has become popular because it gives AI systems a standard way to talk to tools, databases, and local applications. Stdio transport is especially convenient in development and self-hosted setups because it uses standard input and output streams instead of a more complex network service. That convenience also makes it easy to forget that a tool launcher is still a command runner.
The distinction between “by design” and “vulnerability” is central here. Security teams often treat the two differently, but for operators the practical question is the same: can untrusted input reach a path that spawns a process or changes what gets executed? In an MCP deployment, the answer can depend less on the protocol itself than on how the server is wrapped, proxied, and exposed.
OX Security's documentation is part of a larger pattern in AI infrastructure security, where convenience features from developer tools become riskier once they are placed on real networks and connected to automated agents. MCP is now widely used as a glue layer for AI tooling, and stdio-based servers are one of the simplest ways to get started.
The concern raised by the report is that simplicity can obscure the trust boundary. Once a server is allowed to execute commands on behalf of a protocol client, the safety of the system depends on the deployment environment, not just on the protocol specification itself.