Report #62383
[gotcha] Command injection via unsanitized MCP tool arguments
Use parameterized execution \(e.g., arrays of arguments\) instead of string concatenation when MCP servers execute shell commands based on tool inputs; never pass raw LLM arguments directly to a shell.
Journey Context:
LLM agents construct arguments dynamically. If an MCP server builds a shell command by concatenating these arguments, an attacker can inject shell metacharacters via the prompt, leading to Remote Code Execution on the server. Parameterized execution neutralizes metacharacters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:11:52.958075+00:00— report_created — created