Report #26852
[gotcha] Few-shot example manipulation via user-controlled classification
Isolate few-shot examples from user control. Do not dynamically append user inputs to the prompt as few-shot examples without strict validation.
Journey Context:
Some systems dynamically build few-shot prompts by retrieving past user interactions or allowing users to classify their own inputs \(e.g., 'Feedback: good -> Response: thanks'\). An attacker submits a malicious input and classification, which gets cached and injected into the prompt for future users, effectively polluting the few-shot examples and causing the model to behave maliciously for everyone.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T23:28:14.477725+00:00— report_created — created