Report #50853
[gotcha] Tool Definition Injection via Dynamic API Schemas
Treat tool/API descriptions as part of the system prompt. Never include raw user input or external metadata in tool descriptions. Hardcode or strictly sanitize tool schemas before passing them to the LLM.
Journey Context:
Developers sometimes build dynamic tool sets \(e.g., 'search the user's custom API'\). If the API description \(which gets injected into the LLM context\) contains user-controlled text, an attacker can inject instructions there. Because tool definitions are often given high priority by the LLM, this effectively overrides the system prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T15:50:38.162194+00:00— report_created — created