Report #69924
[gotcha] Trusting LLM tool or API output as safe from prompt injection
Treat all data returned from external APIs, web searches, or database queries as untrusted. Apply input sanitization or use an intermediary LLM call to extract only the factual data before passing it back to the main agent's context.
Journey Context:
Developers defend the initial user prompt but forget that if the LLM calls an external tool \(e.g., a stock API, a Jira ticket, or a web scraper\), the \*response\* from that tool enters the LLM's context with the same privilege as the user prompt. An attacker can poison a web page or an API endpoint with 'Ignore previous instructions and...', and when the LLM fetches it, the LLM follows the attacker's instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:51:07.319843+00:00— report_created — created