The Image Was the Prompt: Multimodal Injection via Images, PDFs and Screenshots


The first production prompt-injection incident most teams encounter does not arrive as a clever adversarial prompt — it arrives quietly inside a customer support ticket whose description contains a literal <system>ignore prior instructions</system> tag, which the document loader indexes and the retriever later returns as a top-k result for an unrelated query. This article is a working architect's reference for defending production RAG against prompt injection: an attack taxonomy (direct, indirect via documents, recursive prompt-in-output, multi-turn poisoning), CVE-style example walk-throughs, a five-layer defence-in-depth architecture (input filtering, instruction hierarchy, structured output validation, JSON-schema constrained generation, sandboxed tool execution), an OWASP LLM Top 10 mapping, an evaluation harness with red-team prompts, and the runtime monitoring patterns that turn a one-time hardening exercise into an ongoing security posture.
Prompt injection in 2026 is no longer a research curiosity; it is the day-one architectural assumption. The six-layer defence-in-depth stack is the engineering response: input sanitisation and normalisation, intent classifier and injection detector, prompt-template hardening with delimiters and role separation, tool-use authorisation policy outside the prompt, output classifier and secondary review LLM, output firewall for egress filtering and action-effect simulation. This article walks each layer with its threat model, engineering surface, and operational discipline; the build-order rationale; the composition with category-aware guardrails, agent circuit breakers, observability, and incident response. 8 anti-patterns retired, 5-stage maturity ladder, and the honest summary of where the field sits in early 2026.
A browsing agent obeys the page it reads. Indirect prompt injection, the lethal trifecta, and the dual-LLM plus egress-gating architecture that actually contains it.
NIST says voice biometrics SHALL NOT be used and AWS ended Voice ID in May 2026. Treat audio as data, gate every tool call by policy, and step up out of band.
Advertise and partner
Reach engineering leaders and CTOs reading about AI, mobile and cloud architecture.
Sponsored mentions and co-authored articles or technical deep-dives. Relevant products only, always disclosed.