Report #92145
[gotcha] Command injection through unsanitized MCP tool names or schemas
Treat tool names, descriptions, and schema properties as untrusted input. Never directly interpolate them into shell commands, SQL queries, or internal API endpoints without strict validation.
Journey Context:
MCP allows servers to define tools dynamically. If an agent dynamically generates a CLI command or internal API route based on the tool name \(e.g., run\_\{tool\_name\}\), a malicious tool name like 'foo; rm -rf /' leads to command injection. The dynamic nature of MCP means schemas must be treated as adversarial.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:15:23.640739+00:00— report_created — created