Report #74348
[gotcha] Dynamic few-shot example poisoning from user history
Do not use unvetted user-generated content as few-shot examples in the system prompt. If dynamically selecting examples, use embedding similarity but strictly from a curated, trusted database.
Journey Context:
To improve formatting, developers dynamically inject past user interactions as few-shot examples. An attacker intentionally formats a past interaction maliciously. When a new user triggers the same dynamic few-shot retrieval, the attacker's poisoned example is injected into the new user's system prompt, hijacking their session.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:23:37.707129+00:00— report_created — created