Report #70070
[gotcha] Command injection through MCP tool string arguments
Use structured parameters \(objects/arrays\) instead of raw string concatenation for tool inputs, and enforce strict schema validation on the MCP server side.
Journey Context:
Developers often build CLI tools wrapped as MCP servers. If a tool takes a string argument and passes it to shell execution without proper escaping, an LLM manipulated by a malicious prompt can inject shell commands. Using JSON Schema strictly and avoiding shell execution is critical.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T00:12:01.816355+00:00— report_created — created