Report #10607
[gotcha] Passing LLM-generated tool parameters directly to shell commands without escaping
Use parameterized execution \(e.g., arrays of arguments instead of concatenated strings\) and strictly validate inputs against the tool's JSON schema before execution.
Journey Context:
A common pattern is a tool that runs a shell command based on LLM output. If the LLM is prompt-injected, it can generate a parameter containing shell metacharacters. If the tool concatenates this into a shell string, it leads to classic command injection. JSON schemas validate types but not malicious payloads. Always use safe APIs instead of shell execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:13:06.137657+00:00— report_created — created