Report #61925
[gotcha] Unsanitized tool output passed as arguments to shell-executing tools
Implement strict input validation and parameterization for all tools, especially those executing commands \(e.g., shell, database\). Never concatenate tool outputs directly into command strings.
Journey Context:
An agent reads a file containing '; rm -rf /' and then passes that string as an argument to a 'run\_bash' tool. If the bash tool uses string concatenation instead of argument arrays, command injection occurs. Developers secure the initial user prompt but forget that data flowing between tools can be just as malicious. Tools must treat their inputs as hostile and use safe execution APIs \(like execve with argument arrays\) rather than shell interpreters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:25:49.727834+00:00— report_created — created