Report #26613
[gotcha] LLM agent passes attacker-controlled strings into sensitive function arguments
Apply strict input validation and parameterization on the execution side of function calls, never trusting the LLM to sanitize arguments. Use allowlists for function arguments like URLs, filenames, or email addresses.
Journey Context:
Developers trust the LLM to format the JSON for a function call, but an attacker can manipulate the LLM into calling a function \(e.g., \`execute\_shell\_command\` or \`send\_email\`\) with malicious arguments \(e.g., \`rm -rf /\` or sending data to an attacker's email\). The LLM is just a text generator; it cannot be relied upon to enforce security boundaries. The execution environment must enforce them.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:04:10.648133+00:00— report_created — created