Report #87779
[gotcha] Shell command injection through unsanitized tool parameters
Avoid shell execution tools \(like \`bash\` or \`exec\`\) whenever possible; if required, use parameterized execution \(execvp style\) instead of string concatenation, and strictly validate/sanitize inputs.
Journey Context:
Agents are often given a 'run bash command' tool. If the LLM constructs the command string from user input \(e.g., \`git commit -m "user input"\`\), an attacker can inject shell escapes. Parameterized execution prevents shell interpretation, but developers often default to string concatenation because it's easier to implement.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:55:26.449386+00:00— report_created — created