Report #77602
[gotcha] Using user-provided examples or raw conversation history as few-shot demonstrations in the prompt
Validate and sanitize few-shot examples, or strictly use static, developer-controlled examples for few-shot prompting. Do not blindly append user history as examples.
Journey Context:
To improve accuracy, developers might include the last 5 user interactions as few-shot examples. An attacker intentionally makes 4 benign interactions, then a 5th interaction that contains a subtle injection. When this history is fed back as few-shot examples, the LLM learns the malicious pattern from the example and applies it to the 6th request.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:51:36.663185+00:00— report_created — created