[Paper Review] Agent Privilege Separation in OpenClaw: A Structural Defense Against Prompt Injection
The paper proposes a two-mechanism defense—agent isolation with privilege separation and JSON-structured inter-agent communication—to defend OpenClaw against prompt injection, achieving zero ASR on a 649-attack benchmark when combined.
Prompt injection remains one of the most practical attack vectors against LLM-integrated applications. We replicate the Microsoft LLMail-Inject benchmark (Greshake et al., 2024) against current generation models running inside OpenClaw, an open source multitool agent platform. Our proposed defense combines two mechanisms: agent isolation, implemented as a privilege separated two-agent pipeline with tool partitioning, and JSON formatting, which produces structured output that strips persuasive framing before the action agent processes it. We run four experiments on the same 649 attacks that succeeded against our single-agent baseline. The full pipeline achieves 0 percent attack success rate (ASR) on the evaluated benchmark. Agent isolation alone achieves 0.31 percent ASR, approximately 323 times lower than the baseline. JSON formatting alone achieves 14.18 percent ASR, about 7.1 times lower. Our ablation study confirms that agent isolation is the dominant mechanism. JSON formatting provides additional hardening but is not sufficient on its own. The defense is structural: the action agent never receives raw injection content regardless of model behavior on any individual input.
Motivation & Objective
- Motivate and formalize prompt-injection risks in LLM-integrated agent systems.
- Propose a two-part defense: (i) agent isolation with disjoint tool access, (ii) JSON-structured inter-agent communication with a validator.
- Evaluate the defense using the LLMail-Inject benchmark adapted to OpenClaw and a baseline single-agent setup.
- Quantify the contribution of each mechanism via ablation across 649 baseline-successful attacks.
Proposed method
- Split the agent into Reader (no privileged tools) and Actor (privileged tools) to enforce least privilege.
- Have Reader serialize raw emails into a validated JSON summary.
- Pass only the sanitized JSON output to the Actor with restricted tools.
- Include a lightweight JSON validator that flags potential injection content (used in audit mode for measurement).
- Compare four configurations: Baseline, JSON Validator Only, Two-Agent Only, and Pipeline (full defense).
- Use the 649 attacks that succeeded against the single-agent baseline for normalized comparison.

Experimental results
Research questions
- RQ1How much can prompt-injection success be reduced by enforcing tool-level isolation between agents?
- RQ2What additional gains does JSON-structured inter-agent communication provide beyond isolation alone?
- RQ3Is agent isolation the dominant defense mechanism against prompt injection in multi-tool LLM agents?
- RQ4Can the combined defense achieve zero attack success rate on the LLMail-Inject benchmark within OpenClaw?
Key findings
- Agent isolation yields 0.31% ASR (2 successes) on the 649 baseline attacks, a 323× improvement over the baseline.
- Full pipeline (isolation plus JSON formatting) reduces ASR to 0% on the benchmark, an infinite-improvement equivalent.
- JSON-only formatting reduces ASR to 14.18% (92 successes), a 7.1× improvement but insufficient alone.
- JSON validation with isolation eliminates residual attacks; JSON alone cannot prevent all injections, underscoring the dominance of isolation.
- Across scenarios, data exfiltration and RAG tasks are most challenging for non-isolation defenses, but are blocked entirely by isolation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.