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

Best practiceMCP servers and tools

Treat MCP server configuration as code execution

OWASP ASI05OWASP ASI04

A STDIO MCP server is started by running the command in its configuration. Whoever can write that configuration (a user of your web UI, an API caller, a prompt-injected agent) can run commands on the host. This produced a wave of CVEs in LiteLLM, Flowise, Langflow, Windsurf and others in 2026.

What to do

  1. Never let untrusted users or agents add or edit MCP server definitions; treat the config file like a deployment manifest.
  2. In products, allow-list exact binaries with no argument pass-through (npx and npm are shells), or launch servers only in a sandbox.
  3. Bind local HTTP MCP servers to localhost, validate the Host header and use the SDK versions with DNS rebinding protection on.
  4. Require approval and show the full command whenever an agent proposes a config change.

Sources

Check your own AI plan against the practices: Plan check