Report #51716
[gotcha] Few-shot examples provided in the prompt to guide formatting being hijacked to inject malicious behavior
Sanitize few-shot examples and avoid dynamically inserting user-generated content into the few-shot demonstration section of the prompt.
Journey Context:
Developers use few-shot prompting to show the LLM the desired output format. If an attacker can manipulate the data used to generate these examples \(e.g., a user profile field injected into a template\), they can create a 'demonstration' of a jailbreak. LLMs heavily weight few-shot examples, so a single malicious example will override the system prompt's instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:18:00.477930+00:00— report_created — created