AI SafetyModels 🇷🇺 24.07.2026 11:01

Prompt Injection Is Not Cured by Filters: How to Isolate Untrusted Text Using Architectural Patterns

OpenAIOpenAI AnthropicAnthropic Google DeepMindGoogle DeepMind MicrosoftMicrosoft
Prompt injection remains a structural flaw in LLM applications, not fixed by system prompts or classifiers. Architectural patterns like Dual-LLM, CaMeL from Google DeepMind, and the Agents Rule of Two from Meta provide robust isolation. The article details the threat model, the EchoLeak vulnerability in Microsoft 365 Copilot, and a concrete implementation with three isolated models.
Prompt injection, introduced by Simon Willison in September 2022, occurs when untrusted text in an LLM's context is executed as an instruction. Unlike jailbreaking, it affects applications where the model has access to tools and data, leading to confused deputy and data exfiltration attacks. The article argues that system prompts and guardrail classifiers are ineffective, citing a 2025 study by OpenAI, Anthropic, and Google DeepMind that showed adaptive attacks bypass 12 published defenses with over 90% success. Simon Willison's 'lethal trifecta' identifies three ingredients for data exfiltration: access to private data, contact with untrusted content, and an outbound channel. The EchoLeak vulnerability (CVE-2025-32711) in Microsoft 365 Copilot exploited all three. Meta's 'Agents Rule of Two' states that an agent should have no more than two of three properties: processing untrusted input, access to sensitive systems/data, and ability to change state or communicate externally. Architectures like Dual-LLM (Willison, 2023) separate a privileged LLM (with tools, seeing only trusted input) from a quarantined LLM (with no tools, handling untrusted text), connected by a deterministic controller. Google DeepMind's CaMeL (2024) uses a verifier to enforce that the quarantined model outputs only a strict subset of allowed tokens. Six project patterns from a 2025 paper extend this idea. A concrete implementation is described using three isolated models for a FAQ generator: one privileged with access to company data and tools, one quarantined for untrusted page text, and one for synthesis, with deterministic checks between them.
Сокращения
LLM = Large Language Model — Большая языковая модель
SQL = Structured Query Language — Язык структурированных запросов
XSS = Cross-Site Scripting — Межсайтовый скриптинг
URL = Uniform Resource Locator — Унифицированный указатель ресурса
HTTP = Hypertext Transfer Protocol — Протокол передачи гипертекста
JSON = JavaScript Object Notation — Нотация объектов JavaScript
CSP = Content Security Policy — Политика безопасности контента
RAG = Retrieval-Augmented Generation — Генерация с дополнением через поиск
CVE = Common Vulnerabilities and Exposures — Общие уязвимости и риски
Source: Habr — хаб ИИ — original
Our earlier posts on this topic ↓
Fresh news