Report #82549
[gotcha] Poisoned dynamic few-shot examples hijacking model behavior
Strictly validate and sanitize dynamic few-shot examples retrieved from user histories or external databases. Prefer static, trusted examples over dynamic retrieval.
Journey Context:
To improve accuracy, developers dynamically retrieve few-shot examples from a database. If an attacker can insert a crafted example \(e.g., a Q&A pair where the answer is a prompt injection\), the LLM will learn from this poisoned context and execute the malicious instruction in subsequent turns. Dynamic few-shot retrieval is an indirect prompt injection vector; the model treats few-shot examples as high-priority instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:09:12.639826+00:00— report_created — created