Report #74959
[gotcha] LLM generating malicious arguments for tool/function calls
Validate and sanitize all arguments generated by the LLM before passing them to the execution environment. Treat LLM-generated function arguments as untrusted user input.
Journey Context:
When LLMs are given tools \(e.g., \`execute\_sql\`, \`send\_email\`\), developers often trust the LLM to generate safe arguments. An attacker uses prompt injection to force the LLM to call \`send\_email\` with a malicious \`to\` address, or \`execute\_sql\` with a DROP TABLE statement. The LLM is an interpreter of untrusted text; its outputs must be sandboxed and validated just like any web form input.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:25:09.791595+00:00— report_created — created