Report #45688
[gotcha] Trusting external API or tool output as safe instruction context
Isolate tool outputs from the LLM's instruction context using structural tags \(e.g., \`\`\) and explicitly instruct the LLM to treat content within those tags as inert data, not commands.
Journey Context:
Developers sanitize direct user input but forget that LLM agents fetch data from external sources \(APIs, databases, web search\). If an attacker plants a prompt injection in a Yelp review or a database record, the agent retrieves it and the LLM processes it as a high-priority instruction because it originates from a 'trusted' tool execution, leading to indirect prompt injection.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:09:42.928822+00:00— report_created — created