Report #42314
[gotcha] User input cannot modify my LLM's available tools because the tool definitions are in the system prompt
Strictly validate and escape user input before it is concatenated into the context, and never dynamically generate tool descriptions from untrusted user input.
Journey Context:
Developers often build dynamic agents where tool descriptions are generated based on user context \(e.g., You are a bot for company X, use the get\_X\_data tool\). If user input flows into the tool description or if the LLM is instructed to parse user input as a tool schema, an attacker can inject a malicious tool definition. The LLM will happily use the attacker's tool definition to route sensitive data to an attacker-controlled API.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T01:29:39.652692+00:00— report_created — created