Stage 6 · Indirect Prompt Injection Firewall & Ephemeral MicroVM Sandbox Pattern
Stage 6 zero-trust Agent security architecture isolating untrusted retrieved documents/code inside Dual-LLM privilege boundaries, outbound URL egress allowlists, and ephemeral Firecracker/gVisor microVMs so hijacked context cannot exfiltrate host secrets or pivot internally.
Best For
Web-browsing agents, email/CRM automation copilots, and Cloud Coding Agents executing arbitrary model-generated Python or shell code.
Human-AI Boundary
Privileged tool-dispatching LLMs never ingest raw untrusted HTML; quarantined reader models summarize untrusted content into tightly validated schemas.
Anti-Patterns to Avoid
- Executing LLM-generated `exec()` / subprocess scripts inside the same container holding production DB credentials and VPC metadata endpoints (`169.254.169.254`)
- Allowing untrusted retrieved web text to dynamically populate URLs in a Markdown image tag (``) rendered to users
Latency/Cost Profile & Eval Metrics
Firecracker / gVisor ephemeral microVM warm snapshot boot ~120–250ms · Lightweight microVM pool idle standby vs categorical elimination of RCE / exfiltration breaches
- Exfiltration & Egress Escape Block Rate: 100% block across IMDSv1 SSRF, external Markdown image exfil, and indirect email hijack probes (Run automated security red-team harness before every tool permission expansion)
💰 Business ROI Model & Evidence Level
production_practiceClears enterprise InfoSec audits required to unlock Fortune 500 contracts while mechanically preventing RCE, SSRF, and silent data exfiltration.
🏗️ End-to-End Architecture Pipeline
Untrusted text is parsed solely by a tool-less quarantined LLM into fixed primitive schemas before reaching any privileged action node.
Execute generated code solely inside short-lived network-jailed microVMs; strip external markdown image beacons via strict frontend CSP.
🚨 Production Failure Modes & Signatures
- Allowing tool arguments sourced from retrieved snippets (like webhook URLs or SQL strings) without allowlist validation
- Leaky `/proc` or shared container volumes across tenant sandboxes reusing warm pools improperly
🛡️ Compliance & Governance Hard Constraints
- Default-deny SSRF blocklist (`169.254.0.0/16`, `10.0.0.0/8`, `127.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) at network & DNS level
- Zero host environment secrets injected into code execution container environments
Bidirectional Taxonomy Links
Internal Tools & Primary Sources
- Simon Willison — The Dual LLM Pattern for Prompt Injection Defense (engineering_blog, 2026-11-17)
- OWASP Agentic AI Security & Sandbox Guidelines (official_docs, 2026-11-17)