According to Insights by Beating, security firm OX Security recently disclosed a design-level remote code execution vulnerability in the open protocol led by Anthropic called MCP (Model Context Protocol, a de facto standard for AI agents to invoke external tools). Attackers can execute arbitrary commands on any system running a vulnerable MCP implementation, gaining access to user data, internal databases, API keys, and chat records. The vulnerability stems not from an implementation error, but from the default behavior of the Anthropic official SDK when handling STDIO transmission, affecting the Python, TypeScript, Java, and Rust versions.
STDIO is one of the transmission methods of MCP, enabling local processes to communicate via standard input-output. The StdioServerParameters in the official SDK directly launches a subprocess based on the command parameters in the configuration. If developers do not perform additional input sanitization, any user input that reaches this stage can be turned into a system command. OX Security categorizes the attack surface into four classes: injecting commands directly through the configuration interface; bypassing sanitization by adding line flags to whitelisted commands (e.g., `npx -c
OX Security provided the following statistics: the affected packages have been downloaded over 150 million times in total, with over 7,000 publicly accessible MCP servers, exposing a maximum of 200,000 instances across 200+ open-source projects. The team has submitted over 30 responsible disclosures, receiving 10 or more high-risk or critical CVEs, affecting AI frameworks and IDEs such as LiteLLM, LangFlow, Flowise, Windsurf, GPT Researcher, Agent Zero, DocsGPT, and more. Among the 11 MCP package repositories tested, 9 were vulnerable to this manipulation.
Following the disclosure, Anthropic responded stating that this behavior is "by design," and the execution model of STDIO is part of a "secure default design," placing the responsibility of input sanitization on developers. They refuse to make changes at the protocol or official SDK level. Vendors like DocsGPT and LettaAI have released patches independently, while Anthropic's reference implementation's default behavior remains unchanged.
MCP has become the de facto standard for AI agents interacting with external tools, with OpenAI, Google, and Microsoft all following suit. Without fundamental fixes, any MCP service that adopts the official SDK's default STDIO handling, even if no coding errors were made, could serve as an entry point for attacks.
