Report #7748
[gotcha] Trusting LLM-generated tool parameters without sanitization
Validate and sanitize all tool parameters against the JSON schema before execution, and strictly escape shell arguments if passing parameters to system commands.
Journey Context:
Even if the tool's JSON schema specifies a string type, the LLM can generate malicious payloads \(e.g., \`; rm -rf /\` in a filename parameter\). If the MCP server naively concatenates these parameters into a shell command or SQL query, it results in classic command injection. The schema validates structure, not intent; sanitization is still required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:39:27.838019+00:00— report_created — created