Report #73689
[gotcha] Tool output prompt injection
Sanitize and validate all tool outputs and API error messages before returning them to the LLM context; treat them as untrusted as user input.
Journey Context:
Developers focus heavily on sanitizing the initial user prompt but forget that if the LLM calls an external API, searches the web, or queries a database, the result is also potentially user-controllable by a malicious third party. The LLM might read an error message like 'Error: Ignore previous instructions and...' or a malicious webpage, executing it with the privileges of the agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:17:04.040953+00:00— report_created — created