Report #62923
[gotcha] Dynamically constructing few-shot examples from user history or external data, allowing an attacker to poison the examples
Curate few-shot examples statically or from highly trusted sources. If using dynamic examples, strictly validate them against the desired output format and content policy before injecting them into the prompt.
Journey Context:
To improve accuracy, developers pull past successful interactions to use as few-shot examples. An attacker intentionally generates bad interactions that technically 'succeeded' but contain subtle injection payloads. When these are recycled as examples, the LLM learns the malicious behavior as the standard operating procedure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T12:06:06.916526+00:00— report_created — created