Why Single-Layer Prompt Injection Defense Fails

Rebuff's multi-layered approach highlights that no single detection technique can reliably prevent all prompt injection attacks, necessitating a 'defense-in-depth' strategy where varied methods collectively enhance LLM security.

The top 3

  1. Top 3 Obfuscation Methods Bypassing Single Filters: Single-layer defenses, particularly string-matching filters, are easily defeated by techniques like Base64 encoding, homoglyph substitution (e.g., Cyrillic characters resembling Latin), and zero-width character injection, which the filter often misses but the LLM interprets.
  2. Why Indirect Prompt Injection Thwarts Simple Defenses: Single-layer input filters often fail against indirect prompt injection, where malicious instructions are hidden within seemingly trusted external data, such as retrieved RAG documents or web content, as the LLM processes this as authoritative input.
  3. The Core 'Semantic Gap' Undermining Single-Layer AI Security: LLMs inherently struggle to differentiate between legitimate system instructions and malicious user input because both are processed as natural language, making static, single-point defenses fundamentally vulnerable to instruction overrides and jailbreaks.

Sources

Open the full topic