Report #9445
[gotcha] Agent injects shell commands via unsanitized tool parameters
Never use \`eval\(\)\` or shell execution with string concatenation for tool parameters. Use parameterized execution \(e.g., \`execve\` with an array of arguments\) and strict input validation schemas \(JSON Schema\) for all tool inputs.
Journey Context:
If a tool executes a shell command based on LLM-generated parameters \(e.g., \`git commit -m ""\`\), a malicious prompt can inject shell commands \(e.g., \`"; rm -rf / \#\`\). Parameterized execution prevents the shell from interpreting the LLM's input as commands.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:13:25.525070+00:00— report_created — created