Report #84157
[gotcha] Few-shot examples dynamically populated from untrusted user history poisoning future prompts
Do not use raw user inputs or outputs as few-shot examples in shared system prompts. Curate examples statically or use a separate, isolated LLM call to validate/sanitize examples before injecting them.
Journey Context:
To improve LLM performance, developers save successful interactions to a database and inject them as few-shot examples for future users. An attacker creates a 'successful' interaction that contains a subtle prompt injection. When another user asks a question, the poisoned example is retrieved and injected into their system prompt, compromising their session.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:50:56.732610+00:00— report_created — created