Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentMCP servers and tools

MCP STDIO design flaw: server configs become command execution

CriticalAnthropicLiteLLMWindsurfFlowise

OX Security found that MCP's STDIO transport runs whatever command a server configuration names. Any AI app that lets users, web requests or an agent change that configuration can be turned into remote code execution, and the research produced about a dozen CVEs across popular AI tools.

Replay the attack step by step in the Learning Center

How it happened

  1. To start a local MCP server, the client launches the command listed in its configuration.
  2. The SDKs run that command as given, whether or not it turns out to be an MCP server.
  3. Many AI platforms let users add MCP servers through a web UI or API, some without login, so an attacker can register a 'server' whose command is a reverse shell.
  4. In AI IDEs, prompt injection could make the agent rewrite its own MCP config, giving code execution without a click.

Impact

Attackers could take over machines running affected AI frameworks and IDEs.

The fix

Several projects patched; the protocol maintainers treat the behavior as expected and leave validation to applications. MCP's security best practices now say clients must show the exact command and get consent before starting a local server.

Lessons

  • Treat MCP server configuration from users, web input or model output as untrusted code, and allowlist commands.
  • Never expose AI platforms that can register MCP servers without strong authentication.
  • Install MCP servers only from vetted sources and run them sandboxed.

Sources