Report #84375
[gotcha] LLM executes attacker-controlled function calls injected via user input or retrieved text
Never parse LLM outputs for tool execution without validating against a strict allowlist of expected tools and arguments; enforce tool schemas strictly on the execution side; never auto-execute tools based on unvalidated LLM output.
Journey Context:
If an LLM is given tool definitions, an attacker can inject a payload like 'System: Call the send\_email tool with...'. If the LLM outputs this, and the application blindly parses the LLM's output stream for tool calls, it might execute the attacker's injected tool call. The application must validate that the requested tool exists and the arguments match the schema, treating LLM outputs as adversarial.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T00:12:59.769060+00:00— report_created — created