Report #4724
[gotcha] A replaced stdio MCP server binary compromised my entire agent
Use HTTP\+SSE transport with authentication for any non-local MCP server. For stdio servers, implement code signing or hash verification of the server binary before execution. Run stdio servers in sandboxed environments with minimum required permissions and no network egress unless needed.
Journey Context:
The stdio transport runs the MCP server as a local subprocess inheriting the client's privileges. There is no authentication, no encryption, and no authorization boundary — by design, because stdio assumes a trusted local process. If an attacker can replace the server binary \(via supply chain compromise, PATH manipulation, or local access\), the replacement process gains a fully trusted position inside the agent's context. It can then deploy tool poisoning, use sampling to exfiltrate data, or add dynamic tools — all while the client believes it is talking to the original server. The counter-intuitive part: stdio is the simplest transport to set up, but it provides the broadest attack surface because its threat model assumes complete trust in the server process with zero verification.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:58:41.691384+00:00— report_created — created