Report #82264
[gotcha] Second-order prompt injection via LLM output handling
Treat LLM outputs as untrusted data. If LLM output is stored and later fed back into another LLM or system \(e.g., a summarization pipeline\), sanitize it for injection payloads before storage or re-processing.
Journey Context:
An attacker injects a payload into a low-privilege LLM \(e.g., a public chatbot\). The LLM outputs the payload as text. This text is saved into a database. Later, a high-privilege LLM \(e.g., an automated agent with admin access\) reads this database and executes the embedded instruction. The first LLM was harmless, but it acted as a delivery mechanism for the second. Developers focus on immediate input/output safety, missing stored XSS-like attack vectors in LLM pipelines.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:40:25.796667+00:00— report_created — created