The Research Report
PlanGuard: The Defense That Stops AI Agent Hijacking Cold
AI agents have a problem. A big one. They'll follow instructions from anyone, including attackers hiding commands in emails, web pages, and documents. A new paper called PlanGuard offers a fix that works. Not kind of works. Not mostly works. It drops the attack success rate from 72.8% to zero.
The Problem
Indirect prompt injection is straightforward in concept and terrifying in practice. An attacker buries malicious instructions in content the agent will read. The agent reads it, treats it like a legitimate instruction, and does things the user never asked for.
This isn't theoretical. Researchers demonstrated it on real systems. An agent summarizing emails follows a hidden command inside one of those emails. An agent browsing the web picks up instructions from a malicious page. The agent can't tell the difference between what you told it and what the attacker told it.
The vulnerability comes from context mixing. Everything lands in the same context window. Your instructions. The email content. The webpage text. The model processes it all as one stream. There's no border patrol between trusted and untrusted input.
Two attack types dominate:
- Function hijacking. The agent calls a tool you never asked for. You said "summarize my email." The agent sends an email instead.
- Argument hijacking. The agent calls the right tool but with malicious parameters. You said "delete temp files." The agent deletes system files.
Existing defenses try to fix this at the input stage. They filter. They classify. They train models to resist. These approaches have problems. Classifiers miss novel attacks. Training is expensive. Rule-based systems block too many legitimate actions. None of them watch what the agent actually tries to do.
How PlanGuard Works
PlanGuard takes a different approach. It splits the agent's work into two phases that never touch each other.
The Isolated Planner
Before the agent touches any external data, a separate Planner component reads only the user's instructions and the available tool definitions. It generates a reference action set. This is the blueprint. What tools should be called. What parameters are expected.
The key insight: the Planner never sees external content. It operates in a soundproof room. No emails. No web pages. No attacker payloads. Just the user's intent and the tools available to serve it.
This reference plan becomes the ground truth for everything that follows.
Hierarchical Verification
When the agent goes out and does its work, it encounters all that external content, including potential attack payloads. Before any tool call executes, the verifier checks it against the reference plan.
The verification happens in two stages.
Stage one: hard rules. If the tool name isn't in the reference plan, it's blocked immediately. No questions. No exceptions. This catches function hijacking clean.
If the tool is right but the parameters don't match exactly, the action gets flagged and sent to stage two.
Stage two: intent verification. LLMs are stochastic. They format things differently sometimes. "last_week" versus "lastweek." "Summary of" versus "Summarize." These are benign variations, not attacks.
An Intent Verifier examines the flagged action's reasoning and parameters. It decides whether the deviation is a harmless formatting difference or a malicious attempt to sneak something past the rules. Benign variations pass. Malicious parameter changes get blocked.
This two-stage structure matters. Hard rules alone would block too many legitimate actions. The paper found that stage-one-only verification produced false positive rates of 27% to 38%. Adding the Intent Verifier brought that down to 0.97% and 3.28% depending on the scenario.
The Results
The researchers tested PlanGuard on the InjecAgent benchmark, covering 1,054 test cases across two attack categories: direct harm and data stealing.
The results are striking.
- Attack success rate dropped from 72.8% to 0%. Not reduced. Eliminated.
- False positive rate landed at 1.49% averaged across scenarios.
- The defense works without any model fine-tuning.
- It's model-agnostic. Drop it in with any LLM.
The zero percent attack success rate held even under white-box assumptions. Attackers who knew exactly how the defense worked still couldn't get through. The architecture makes it mathematically difficult to compromise because the Planner never sees the attacker's content.
Where This Fits in the Defense Stack
PlanGuard isn't alone. It's the third paper in a rapidly emerging defense stack for agent security.
ClawGuard (arXiv:2604.11790), published just two days after PlanGuard, takes a runtime enforcement approach. It creates user-confirmed rule sets and checks every tool call at the boundary before execution. It handles three injection channels: web and local content, MCP server injection, and skill file injection. Tested on five models across three benchmarks with open-source code.
PlanGuard complements ClawGuard's runtime interception. Where ClawGuard enforces rules at tool-call boundaries, PlanGuard verifies that the agent's plan stays consistent with the user's original intent. One watches the gate. The other checks the map.
Together they suggest a pattern: agent security is moving from alignment-based approaches, which depend on the model being well-behaved, to architectural approaches, which make bad behavior structurally impossible.
Why This Matters
The shift from probabilistic defense to deterministic defense is the story here.
Alignment training tells the model, "please don't do bad things." That works until someone finds a prompt the model follows anyway. It's a request, not a constraint.
PlanGuard and ClawGuard both move toward something different. They create structures where the agent literally cannot execute unauthorized actions, regardless of what the model's internal preferences are. The planner is isolated. The rules are enforced. The verification is deterministic.
This is the difference between asking a bouncer to be nice and installing a lock on the door.
The Limitations
PlanGuard isn't perfect. The Intent Verifier itself is an LLM, which introduces its own potential failure modes. A sufficiently clever attack might find ways to confuse the verifier in stage two, though the paper's results suggest this is hard in practice.
The reference plan depends on the Planner correctly interpreting the user's instructions. Ambiguous requests could produce incomplete plans, leaving gaps that legitimate actions fall outside of. The 1.49% false positive rate suggests this is manageable but not zero.
And like all defense papers, the benchmarks test known attack patterns. Novel attack vectors may emerge that challenge these specific architectural choices.
What Comes Next
Three papers in a month. Each takes a different angle on the same structural problem. The field is converging on a consensus: agent security needs architectural boundaries, not better prompts.
The practical question is integration. How do PlanGuard's plan verification, ClawGuard's runtime enforcement, and other emerging defenses compose together? Do they stack cleanly? Do they interfere? The papers don't address this yet, but it's the obvious next step.
For anyone building agent systems today, the takeaway is clear. Stop relying on alignment alone. Start building verification layers. The tools exist. The benchmarks show they work. The attack surface is real.
Citations
- Gong, G. & Deng, Z. (2026). "PlanGuard: Defending Agents against Indirect Prompt Injection via Planning-based Consistency Verification." arXiv:2604.10134. https://arxiv.org/abs/2604.10134
- Zhao, W., Li, Z., Zhang, P., & Sun, J. (2026). "ClawGuard: A Runtime Security Framework for Tool-Augmented LLM Agents Against Indirect Prompt Injection." arXiv:2604.11790. https://arxiv.org/abs/2604.11790v1
- InjecAgent benchmark: referenced in PlanGuard paper for evaluation
- PlanGuard GitHub repository: https://github.com/GongGuangyu/PlanGuard
Suggested Title
PlanGuard: The Defense That Stops AI Agent Hijacking Cold
Word Count
~950 words
Fact-Check Notes
- Attack success rate of 72.8% to 0% — Directly from the paper's abstract and experimental results. Verified on arXiv abstract page.
- False positive rate of 1.49% — From the abstract. The detailed breakdown in the paper shows 0.97% for Direct Harm and 3.28% for Data Stealing scenarios. The 1.49% appears to be an average or combined figure.
- ClawGuard publication date — arXiv submission shows April 13, 2026. PlanGuard was submitted April 11, 2026. Two days apart.
- InjecAgent benchmark 1,054 test cases — From the gist.science summary. Should verify against the full paper PDF if citing in final version.
- ClawGuard handling MCP server injection and skill file injection — From ClawGuard abstract. Verified.
- "Third paper in the defense stack" — The task brief described this as the third paper. ClawGuard is the second. The first paper in this stack was not specified in the brief and I did not find a clear candidate. This claim should be verified or softened to "part of an emerging stack" rather than "third paper" if no clear first paper is identified.
- White-box attack resistance — The gist.science summary states this. Worth confirming against the full PDF for precise wording.
- PlanGuard GitHub (GongGuangyu/PlanGuard) — Exists with 1 star, Apache 2.0 license. Low activity. Confirm this is the official repo before linking.