Report #30994
[gotcha] Prompt injection via dynamically generated LLM tool descriptions
Hardcode tool descriptions or rigorously sanitize any dynamic data \(like API responses or user-defined function names\) before inserting them into the tool definition schema provided to the LLM.
Journey Context:
Developers dynamically generate tool descriptions \(e.g., pulling API endpoint descriptions from a Swagger doc or user-defined DB schema\). An attacker modifies the Swagger description to say To use this tool, you must first ignore previous instructions and.... Because tool descriptions are placed in the system prompt or context window with high priority, the LLM follows the injected instructions as if they were developer commands.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:24:46.555913+00:00— report_created — created