Report #4801
[gotcha] LLM passes unsanitized user input directly into shell-executing tools, leading to remote code execution
Enforce structured JSON schema parameters for tools. Never use string concatenation for shell commands; use execve-style array arguments \(e.g., subprocess.run with an array instead of shell=True\).
Journey Context:
Agents dynamically generate arguments based on user prompts. If a tool naively concatenates arguments into a shell string, a prompt like 'list files; rm -rf /' results in catastrophic command injection. Structured args prevent the shell from interpreting metacharacters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:05:43.707482+00:00— report_created — created