Report #40276
[gotcha] Command Injection via LLM-Generated Parameters
MCP servers must validate and sanitize all incoming parameters; use parameterized queries and avoid shell execution with raw string interpolation.
Journey Context:
The LLM is a text generator, not a security filter. If a user says 'delete file named ; rm -rf /', the LLM might faithfully pass that string to a delete\_file tool. The MCP server runs it, causing command injection. Developers assume the LLM will 'know' not to do this, but the LLM is just following the user's intent to delete the specified file.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:04:37.921276+00:00— report_created — created