Prompt injection detection is already broken: what 100% evasion means for your defense architecture

TL;DR. Six prompt injection and jailbreak detectors, including Azure Prompt Shield and Meta’s Prompt Guard, were evaded at up to 100% using character injection such as emoji smuggling (Hackett et al., April 2025, arXiv 2504.11168). Detection-first defense is structurally broken because attackers control the optimization target. The fix is defense-in-depth that assumes your detector will fail.
You deployed a detector. You are not protected.
Picture the usual rollout. You run Azure Prompt Shield against your test suite. It catches 98% of the malicious prompts. You ship it to production and the security review passes.
In April 2025, researchers from Mindgard and Lancaster University published a paper that should make you reconsider that decision (Hackett et al., arXiv 2504.11168). They tested character injection and adversarial machine learning (AML) techniques against six prompt injection and jailbreak detectors: Azure Prompt Shield, Meta’s Prompt Guard, ProtectAI’s detector (v1 and v2), NVIDIA NeMo Guard Jailbreak Detect, and Vijil Prompt Injection. Some techniques evaded detection 100% of the time. These are not toy models. They are tools enterprises deploy today.
Your test suite measured the attacks nobody had optimized against your detector yet.
Other work points the same way. A June 2025 systematization of jailbreak guardrails (arXiv 2506.10597) benchmarked nine guardrails, from perplexity filters to Llama Guard and Prompt Guard, and found that “no single guardrail excels across all dimensions” of security, efficiency and utility, and that multi-turn attacks bypass them readily. The problem is not that current detectors are bad. The problem is that detection-centric defense is the wrong architecture.
What does 100% evasion look like?
The evasion techniques in arXiv 2504.11168 are not sophisticated zero-days. They are straightforward transformations that exploit a mismatch between how detectors classify text and how LLMs interpret it. The paper tested two families.
| Technique family | How it works | Why detectors miss it |
|---|---|---|
| Character injection (12 variants) | Rewrite the prompt with emoji smuggling (text hidden in emoji variation selectors), Unicode tag smuggling, zero-width characters, homoglyphs, diacritics, upside-down or full-width text, bidirectional text and similar tricks | The detector’s tokenizer and classifier see noise or nothing; a capable LLM can still recover the instruction |
| Adversarial ML word perturbation | Swap or perturb the words that matter most to the classifier (TextFooler, BERT-Attack, PWWS, DeepWordBug, BAE), using word importance computed on an offline white-box model | Small edits flip the classifier’s label while keeping the meaning |
The best results per detector, on the paper’s prompt injection set (jailbreak set for NeMo Guard, which only detects jailbreaks):
| Detector | Best character injection evasion | Best AML evasion |
|---|---|---|
| Azure Prompt Shield | 100% (emoji smuggling) | 65% |
| ProtectAI v1 | 100% | 100% |
| ProtectAI v2 | 100% (emoji and Unicode tag smuggling only) | 88% |
| Meta Prompt Guard | 100% | 8% |
| Vijil Prompt Injection | 100% | 32% |
| NeMo Guard Jailbreak Detect | 100% | 96% |
Emoji smuggling alone evaded every detector tested. The 100% figure means that for at least one technique, every adversarial prompt in the test set was classified as benign. One caveat matters for defenders: the paper measures whether the detector is fooled, and notes that it did not rigorously measure whether each modified prompt still worked on the downstream LLM. Hidden-character payloads only land if the target model decodes them, so test that against your own model rather than assuming either way.
Why can’t we build a better detector?
Web application firewalls never solved SQL injection; parameterized queries did, by separating code from data. Prompt injection is a structural attack makes that comparison in full. The short version: prompt injection has no equivalent separation. In an LLM, instructions and data occupy the same token stream. The model cannot distinguish “ignore previous instructions” planted in a document from “ignore previous instructions” typed by a user. Both are tokens. Both get attended to. Both influence the output.
graph LR
A[Attacker crafts evasion] --> B[Bypasses detector]
B --> C[Reaches LLM]
C --> D[Executes malicious intent]
D --> E[Defender updates detector]
E --> F[Attacker adapts evasion]
F --> B
style A fill:#d32f2f,color:#fff
style E fill:#1976d2,color:#fff
This loop never converges in the defender’s favor. The attacker has a structural advantage: they can observe the detector’s behavior (most are API-accessible), rank which words drive its decision on an open model they control, and iterate faster than the defender can retrain. The 2504.11168 authors did exactly that: word importance computed on offline white-box models made their attacks on black-box detectors more effective.
This is not a “we need better models” problem. It is a “the architecture assumes detection works” problem.
How bad is the current exposure?
The numbers paint a grim picture of how much enterprise infrastructure depends on detection that does not work.
| Metric | Value | Source |
|---|---|---|
| Organizations planning agentic AI deployment | 83% | Cisco State of AI Security 2026 |
| Organizations that feel ready to deploy agentic AI securely | 29% | Cisco State of AI Security 2026 |
| Internet-exposed OpenClaw agent instances | 40,000+ | SecurityScorecard, early 2026; China’s CNCERT issued an OpenClaw risk warning in March 2026 |
| OWASP LLM vulnerability ranking for prompt injection | #1 (LLM01) | OWASP Top 10 for LLM Applications, 2025 |
The gap between 83% planning agentic deployment and 29% feeling ready to do so securely suggests that many organizations are building agent systems they do not yet know how to secure.
Indirect injection, where the malicious payload arrives not from the user but from a document, email, calendar invite, or API response the agent processes, is the dominant production attack vector. Simon Willison calls the dangerous combination the “lethal trifecta”: an agent that (1) has access to private data, (2) is exposed to untrusted content, and (3) can communicate externally. Most agents with useful tool access meet all three criteria.
Palo Alto Networks’ Unit 42 confirmed this pattern in March 2026 with “Fooling AI Agents: Web-Based Indirect Prompt Injection Observed in the Wild”, documenting hidden instructions planted in web pages that AI agents read. Google followed in April 2026 with a post on Google Workspace’s continuous approach to mitigating indirect prompt injection, an acknowledgment that its own AI features face this attack surface.
What does a defense that assumes detection failure look like?
If detection cannot be the gate, it must become one signal among many. The architecture shifts from “block bad inputs” to “constrain what the agent can do regardless of input.”
AgentWatcher (arXiv 2604.01194, April 2026) shows one version of this. Instead of scanning the whole input, it first attributes each agent action to the few context segments that drove it, using the attention weights of a small attribution model. A monitor LLM then checks only those segments against explicit rules for what counts as prompt injection. On AgentDojo it reports attack success of about 1% or lower, while utility without attacks moves only from 0.73 to 0.71. It is still a detector, but one pointed at the question that matters: what caused this tool call?
The principle: do not ask “is this input malicious?” Ask “should this input be causing this action?”
graph TD
A[User request] --> B[Input detection layer]
A --> C[LLM agent processes request]
B -->|Signal, not gate| D[Risk scoring engine]
C --> E[Agent requests tool call]
E --> F[Causal attribution check]
F -->|Input caused this call?| D
D --> G{Risk threshold}
G -->|Low risk| H[Execute tool call]
G -->|Medium risk| I[Execute with logging + alerts]
G -->|High risk| J[Human approval required]
K[Behavioral monitor] --> D
L[Output validator] --> D
style B fill:#ff9800,color:#000
style F fill:#4caf50,color:#fff
style J fill:#d32f2f,color:#fff
Google’s Workspace guidance follows the same principle. Its layered defense for Gemini combines prompt injection classifiers and model hardening with user confirmation before sensitive actions, treating detection as one layer rather than the only gate.
Tencent’s open-source AI-Infra-Guard takes the automation path: a red-teaming platform with scanners for running agents, skills, MCP servers and AI infrastructure. The useful question for any such tool is not just whether injection is possible but whether injected prompts can actually reach high-impact tools.
The practitioner checklist: what to build this week
Detection stays in your stack. It catches low-effort attacks and raises the cost of exploitation. But it is no longer your primary control.
Least-privilege tool access. Every tool the agent can call is an attack surface. If your customer-support agent has database write access “just in case,” that is a prompt injection away from data destruction. Audit tool permissions weekly. The principle from excessive agency applies directly.
Output validation, not just input filtering. Validate what the agent produces and what tools it calls, not just what goes in. If an agent suddenly calls a tool it has never used in this conversation context, flag it. Behavioral baselines catch attacks that input filters miss.
Causal attribution on tool calls. Implement AgentWatcher-style tracing: which part of the input drove this tool invocation? If the answer is “a paragraph from an external document,” apply higher scrutiny. AttriGuard and the wider defense stack take the same idea further.
Human-in-the-loop for irreversible actions. Any tool call that sends data externally, modifies production state, or accesses credentials should require human approval. The latency cost is real. The alternative, an automated agent executing attacker-controlled instructions, is worse.
Assume breach: log everything. If detection fails and behavioral monitoring fails, your last line is forensics. Log every tool call, every input source, every output. Not for compliance theater. For the incident response team that will need this at 2 AM.
Test your defenses with adversarial evasion, not just red team prompts. If your red team is writing “ignore previous instructions” by hand, they are testing against the weakest attacks. Use the evasion techniques from arXiv 2504.11168 (emoji and Unicode tag smuggling, zero-width and homoglyph substitution, word-level adversarial perturbation) against your own pipeline. Open-source scanners such as Tencent’s AI-Infra-Guard can send test prompts to a running agent and help automate this.
Key takeaways
- Six widely used detectors (Azure Prompt Shield, Prompt Guard, ProtectAI, NeMo Guard, Vijil) were evaded at up to 100% with character injection such as emoji smuggling, while word-level adversarial ML reached 65-100% against four of them (arXiv 2504.11168, April 2025)
- Detection-centric defense is structurally broken: attackers control the optimization loop and can iterate faster than defenders retrain
- 83% of organizations are planning agentic AI deployment, but only 29% feel ready to do so securely (Cisco, 2026)
- Attribution-based monitors such as AgentWatcher report attack success around 1% or lower on AgentDojo by asking “should this input cause this action?” instead of “is this input malicious?”
- The defense architecture that works treats detection as one signal in a layered system: least-privilege access, output validation, behavioral monitoring, human-in-the-loop gates, and comprehensive logging
FAQ
Can prompt injection be fully prevented by detection tools? No. An April 2025 study evaded detectors including Azure Prompt Shield and Meta’s Prompt Guard at up to 100% (arXiv 2504.11168). Detection is necessary as a cost-raising measure but insufficient as a primary defense. It must be one layer in a defense-in-depth architecture that includes tool-level access controls, behavioral monitoring, and human approval gates for high-risk actions.
What is the most effective defense against prompt injection today? No single control. The strongest results come from checking actions rather than inputs: attribution-based monitors such as AgentWatcher (arXiv 2604.01194) report attack success around 1% or lower on AgentDojo with a two-point utility cost, and deterministic tool-boundary enforcement such as ClawGuard blocks disallowed tool calls regardless of what the model was persuaded to do. The shift: validate what the agent does, not what it receives.
Should I remove my prompt injection detector? No. Keep it. Detection raises the cost of attack and catches low-effort exploitation. The mistake is treating it as a gate that blocks attacks. Treat it as a signal that feeds into a broader risk scoring engine alongside behavioral monitoring, causal attribution, and output validation.
How do I test whether my agent is vulnerable to these evasion techniques? Run the evasion techniques from arXiv 2504.11168 against your pipeline: character injection (emoji and Unicode tag smuggling, zero-width characters, homoglyphs) and word-level adversarial perturbation. Add encoded payloads such as Base64 and multi-turn attacks, which the paper did not cover but attackers use. Open-source red-teaming tools such as Tencent’s AI-Infra-Guard can automate part of this against a running agent.
Further reading
- Prompt injection is a structural attack: you can’t filter your way out: the foundational argument for why input filtering fails
- The 272,000-attack study: what a large-scale prompt injection competition found: empirical data from the largest injection competition
- Defense-in-depth for LLM applications: the layered architecture this post builds on
- Indirect prompt injection: the attack vector hiding in your data: deep dive on injection through documents, email and tool output
- Architecting secure AI agents: the defense stack: the layers that replace detection as the gate
- ClawGuard: runtime prompt injection defense: deterministic enforcement at the tool-call boundary
- Excessive agency: how over-provisioned agents become insider threats: why least-privilege matters for agents