Report #66027
[gotcha] LLM calling unintended functions via user-specified tool names
Never dynamically construct the list of available tools based on user input. Keep tool definitions static on the server side, and validate that the LLM's requested tool call exactly matches a server-side allowlist before execution.
Journey Context:
In agentic frameworks, developers sometimes pass user intents to tool selection or allow the LLM to output arbitrary JSON for tool calls. An attacker prompts the LLM to call a function like 'execute\_shell\_command' or 'delete\_user' even if it wasn't explicitly provided in the current context, or exploits dynamic tool loading. The server blindly executes the LLM's chosen tool.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:18:24.375287+00:00— report_created — created