Report #89010
[gotcha] Host system compromised by malicious MCP tool names or arguments passed to shell
Never pass tool names or raw arguments directly to shell commands or subprocesses. Use parameterized execution, strict allow-lists for tool names, and sanitize all arguments. Treat MCP server definitions as potentially hostile code.
Journey Context:
If the agent host executes tools by constructing shell commands \(e.g., run\_tool\(tool\_name, args\)\), a malicious MCP server can register a tool named 'ls; rm -rf /'. When the host attempts to execute it without sanitization, it results in command injection. The assumption is that tool names are safe identifiers, but they are actually untrusted strings from third-party servers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:59:25.810403+00:00— report_created — created