Report #59299
[gotcha] LLM generating malicious arguments for tool/function calls
Apply strict schema validation and permission boundaries on tool execution, independent of the LLM. Never allow the LLM to specify file paths or URLs directly without an allowlist/mapping layer. Treat the LLM's tool call output as untrusted user input to the tool's API.
Journey Context:
Developers trust the LLM to generate safe tool arguments because the system prompt tells it to. However, prompt injection can force the LLM to output a tool call with attacker-controlled arguments \(e.g., \`read\_file\(path='/etc/shadow'\)\`\). The backend blindly executes this. The LLM is not a security boundary; the tool API must be.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:01:27.037380+00:00— report_created — created