How Canary Tokens Reveal LLM Context Leaks

Rebuff integrates a unique, secret canary word or phrase into the LLM's prompt template, along with instructions to keep it hidden. If this canary word unexpectedly appears in the model's generated output, it serves as a clear indicator of a successful context extraction or prompt leakage attack.

The top 3

  1. Top 3 Critical LLM Context Leaks Canary Tokens Reveal: Canary tokens specifically expose leaked system prompts, internal instructions, and sensitive data like API keys or PII embedded within an LLM's operational context, signaling unauthorized extraction.
  2. Three Core Mechanisms Triggering Canary Token Alerts: Canary tokens activate by triggering discreet network requests (DNS lookups or HTTP calls) or authentication attempts to a monitored server, silently alerting security teams upon unauthorized interaction.
  3. Canary Tokens: Why They Outperform Basic LLM Filters: Unlike pattern-based filters prone to false positives, canary tokens provide deterministic, zero-false-positive detection of LLM context leaks post-injection, offering early, actionable alerts without stopping the initial attack.

Sources

Open the full topic