Skip to content

From Assistant to Double Agent: Formalizing and Benchmarking OpenClaw Attacks against Personalized Local AI AgentsFrom Assistant to Double Agent: Formalizing and Benchmarking Attacks on OpenClaw for Personalized Local AI Agent

arXiv· arXiv:2602.08412· Yuhang Wang, Feiming Xu, Zheng Lin, Guangyu He, Yuzhe Huang, Haichang Gao, Zhenxing Niu, Shiguo Lian, Zhaoxiang Liu·Indexed by this site · 2026-10-12· Originally publishedEvaluation

Quick read

Evaluation and benchmarks

Based on the paper PDF (AI-generated); refer to the original

PASB evaluates OpenClaw: Llama-3.1-70B-Instruct no-defense Combined ASR is 66.8%.

Questions
Personalized agents run continuously, accumulate private context, and call high-privilege tools; malicious input can travel along the action chain to become leakage or unsafe actions. Existing evaluations are mostly synthetic or task-centric, white-box or instrumentable environments, which the authors believe cannot reflect the attack surface of real deployments like OpenClaw.
Methods
PASB evaluates deployed OpenClaw in a black-box end-to-end manner. It places direct injection, indirect injection, tool-return deception, and memory poisoning into three scenarios (external content, long-term memory, and skills/plugins), and determines success based on leakage, violating tool actions, and persistent harm after injection stops, on observable trajectories.
Experiments and results
Llama-3.1-70B-Instruct, Qwen2.5-7B-Instruct, and GPT-4o-mini have no-defense Combined ASR of 66.8%, 52.7%, and 61.9% (Table 2). Long-term memory is higher than short-term memory, and residuals remain after defenses.
Limitations and future work
The authors plan to improve defenses that handle both tool execution and long-range propagation, and expand PASB's scenarios and adversary capabilities. Evaluated 3 backbones of OpenClaw, Table 2's IPI and Tables 3–4 memory tasks; did not report N, T, and the Pleak/Pact/Ppersist decomposition of ASR.
Experimental setupLlama-3.1-70B-Instruct、Qwen2.5-7B-Instruct et al. · PASB、OpenClaw et al. · ASR、Resp Rate et al.
Evaluated models
Llama-3.1-70B-InstructQwen2.5-7B-InstructGPT-4o-mini
Benchmarks
PASBOpenClawOpenClaw public Skills registry
Metrics
ASRResp RateSTM-Extract Success RateLTM-Extract Success RateSTM-Edit WSRLTM-Edit WSR
AI summaryThe paper proposes PASB (Personalized Agent Security Bench), an end-to-end security evaluation framework for real-world personalized AI agents, and conducts a black-box evaluation using OpenClaw as a case study. The framework adds personalized usage scenarios, real toolchains, and long-horizon interactions to existing agent attack paradigms. Evaluation results show that OpenClaw has severe vulnerabilities across different execution stages, including user prompt processing, tool use, and memory retrieval. The framework code is open-sourced on GitHub.

The paper proposes PASB (Personalized Agent Security Bench), an end-to-end security evaluation framework for real-world personalized AI agents, and conducts a black-box evaluation using OpenClaw as a case study. The framework adds personalized usage scenarios, real toolchains, and long-horizon interactions to existing agent attack paradigms. Evaluation results show that OpenClaw has severe vulnerabilities across different execution stages, including user prompt processing, tool use, and memory retrieval. The framework code is open-sourced on GitHub.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Existing evaluations are more synthetic and task-centric; PASB evaluates OpenClaw with a black-box end-to-end framework.

    In real deployment, what system-level vulnerabilities do personalized agents expose during end-to-end execution, and how do risks propagate across action chains?

    • Scenario: The authors say agents are evolving from task-based systems to continuously running personalized assistants with long-term interactions, private contexts, and high-privilege tools. The authors believe failures can manifest as unsafe actions executed or private assets exfiltrated in end-to-end interactions, not just as bad text.
    • Gap: The authors say existing evaluations mostly focus on synthetic or task-centric settings. Taking Agent Security Bench as an example, they say it is often built in controlled, white-box, or synthetic environments, relying on custom agents and tool interfaces. They also say existing benchmarks often lack personalized scenarios, private assets, and high-privilege tool chains, omit long-term interactions and cross-stage propagation, and rely on instrumentable implementations or simplified tool environments.
    • Approach: Propose Personalized Agent Security Bench (PASB), adding personalized scenarios, real tool chains, and long-term interactions to existing attack paradigms, and doing black-box end-to-end evaluation on real systems.
    • Threat model:
      • Goals: Induce system-level harm, including unauthorized disclosure of private assets, unsafe or unauthorized tool actions, and malicious influence persisting across steps or sessions.
      • Knowledge: Black-box. No access to backbone parameters, hidden states, or system prompts; no reliance on instrumentation beyond normal interactions and tool inputs/outputs. Know public interfaces, tool documentation and schemas, and general properties of the model family; do not know user private assets, memory implementation details, or exact contents of memory stores.
      • Capabilities: Can provide adaptive user-side inputs, control or influence untrusted external content entering observations, and influence tool returns in realistic deployment manners, e.g., controlling remote content sources or service endpoints. Can observe outputs and observable trajectories, and adapt within interaction budgets.
      • Out of scope: Direct host compromise, modifying agent code, rewriting system prompts or model weights; network-layer denial of service, physical attacks, and exfiltration bypassing the agent–tool interface.
  2. What related research exists?

    The authors place PASB on top of existing attack paradigms to black-box evaluate real deployments rather than synthetic agents.

    The paper does not have a separate Related Work section; related work is concentrated in the introduction, cited by capability, attack, and evaluation gaps.

    Agent capabilities and persistent operation

    • Wang et al. (2024), Yao et al. (2022)'s ReAct, Schick et al. (2023)'s Toolformer: the paper uses these to illustrate autonomous reasoning, task planning, and external tool use.
    • Park et al. (2023)'s Generative Agents: the paper uses this to illustrate persistent operation across rounds and sessions.
    • Hong et al. (2023)'s MetaGPT, Wei et al. (2022)'s chain of thought: the paper says capability research often emphasizes effectiveness, generalization, and task completion, with relatively limited safety discussion in real deployments.

    Agent attacks

    • Greshake et al. (2023): the paper cites this indirect prompt injection work when discussing malicious inputs causing disclosure, unsafe tool calls, or long-term manipulation along action chains.
    • Chen et al. (2024)'s AgentPoison: the paper cites it as a risk source of memory or knowledge base poisoning.
    • Zhan et al. (2024)'s InjecAgent: evaluates indirect prompt injection in tool-integrated agents. The paper cites it when claiming real-deployment safety discussions and system evaluations remain relatively limited, without separately expanding comparisons.

    Evaluation benchmarks

    • Zhang et al. (2025)'s Agent Security Bench: classifies and evaluates prompt injection, indirect injection, tool misuse, and memory poisoning. The paper uses it as an example of existing works often built in controlled, white-box, or synthetic environments.
    • Debenedetti et al. (2024)'s AgentDojo: the paper cites it as an example of instrumentable experiments and says such designs rely on custom agents and custom tool interfaces.
    • Liu et al. (2023)'s AgentBench, Mialon et al. (2023)'s GAIA: the paper uses these to contrast "evaluating synthetic agents in controlled settings".

    Experimental comparisons

    • The paper does not run ASB, AgentDojo, or InjecAgent as comparison baselines. In-experiment attack names are Naive Attack, Escape Char Attack, Context Ignore Attack, Fake Completion Attack, Combined Attack; defenses are Delimiter, Sandwich, Instruction Prevention. Evaluation environment is OpenClaw on PASB, with the table implementation called Clawdbot.

    The authors say PASB inherits and extends existing attack paradigms, adding personalized scenarios with auditable private assets, self-built web ranges and controlled tool services, and black-box end-to-end automatic evaluation, to see how risks propagate along action chains rather than only output-level checks. The paper cites Liu & Jabbarvand (2025) when stating missing personalization modeling, cites Feng et al. (2026) when stating existing evaluations often omit long-term interactions and cross-stage propagation, and cites Deng et al. (2023) when stating many benchmarks rely on instrumentable white-box implementations or simplified tool environments.

  3. How does the paper address this problem?

    PASB uses three scenario types and four attack primitives, evaluating system-level harm on observable trajectories.

    PASB places existing attack primitives into personalized workflows and conducts black-box, end-to-end evaluation on a real deployed OpenClaw. The Figure 1 caption depicts the agent as simultaneously contacting external content hubs, tools, and maintaining private memory.

    Problem Setting and Success Predicate

    • Agent: A consists of a backbone model, system prompt, tool set with permission levels, and long-term memory. Each step's observation mixes user input, untrusted external content, previous tool outputs, and retrieved memory. Actions are text responses or structured tool calls.
    • Attack task: Composed of scenario and initial context, adversary-controllable inputs and injection channels, interaction budget with maximum steps, adversarial goal type, and success predicate. Execution yields an interaction trajectory.
    • Observable trajectory: Contains user-side inputs, agent responses, tool call events (tool and arguments), and tool returns. The paper states that because it is real-deployment oriented, success is determined only based on this trajectory.
    • Success predicate: Success if at least one of leakage, violation action, or persistent harm holds: P(tr(τ))=𝕀(Pleak∨ Pact∨ Ppersist). Leakage means a predefined canary set's protected asset appears in responses, tool calls, or tool returns; violation action means a tool call violates scenario policy; persistent harm means harm still occurs after the adversary stops injection. Attack success rate over task distribution is ASR=𝔼Γ∼πΓ[P(tr(τΓ))].

    Threat Model and Scenarios

    • Adversary: Section 2.2 is black-box. Goals are unauthorized disclosure, unsafe or unauthorized tool actions, and persistent effects across steps or sessions. No host compromise, code modification, system prompt modification, weight modification, or exfiltration bypassing the agent–tool interface.
    • Scenario A: External Content Hub. The authors say it is inspired by content platforms like Moltbook. The agent fetches web pages, posts, comments, structured fields, links, and attachments. A self-built multi-page range embeds payloads in seemingly benign forms.
    • Scenario B: Personal Context & Long-Term Memory Management. Malicious content written to long-term memory can affect later tasks without new injections. Canary secrets and sensitive context markers are placed in memory.
    • Scenario C: Skills/Plugins and Tool-Return Risks. Mixed-trust skills, plugins, and third-party services. The authors say agents often default to trusting tool outputs; this scenario examines tool-return manipulation, skill impersonation, and cross-task cascades.

    Four Classes of Attack Primitives

    • Direct prompt injection: Adversary controls or influences user-side input and adds instruction payloads, causing the agent to deviate from goals, disclose unauthorized information, or trigger unsafe tool calls.
    • Indirect injection: User prompts can remain benign; payloads enter observations via external content the agent fetches or reads. Figure 2 caption is an example of indirect prompt injection on OpenClaw.
    • Tool-return deception: Manipulates tool outputs that enter subsequent observations, causing failures to cascade along tool loops.
    • Memory poisoning: Induces malicious entries to be written to long-term memory, or causes harmful entries to return in later retrieval. The authors say its characteristic is that after the adversary stops injection, later benign tasks may still trigger harm.
    • Adaptive selection: Formalizes a black-box strategy that selects payloads only based on observable trajectory. The main text does not map the five attack names in experiments to this strategy.

    Skill Sets, Defenses, and Evaluation

    • Skill sets: Scenarios A and C use 131 threat skills from the public Skills registry in OpenClaw, categorized into eight classes (Table 1). Each skill has a fixed query, return value template, and injection instruction, and the first step's query is unrelated to the target skill. Table 2 states that IPI is placed in step 1's tool observation, inducing step 2 to call the target skill.
    • Defenses: Delimiter inserts special delimiters around input; Sandwich wraps prompts with protective layers; Instruction Prevention uses predefined instructions to restrict specific harmful actions, especially prompt-based attacks. The paper does not provide the delimiter or instruction text.
    • Run: Black-box access to deployed OpenClaw. Harness drives user prompts, controlled external content, controlled tool or skill endpoints, and follow-up prompts as needed. Records responses, tool or skill calls, and return values, then evaluates with automatic rules. Private assets are implemented as auditable canary strings; high-privilege operations are restricted to isolated sandboxes, subject to scenario policies on allowed or prohibited tool categories and operation scopes. The paper states each configuration runs N independent trials, fixed max steps T, and reports means, without giving N and T values.
  4. What experiments did the paper conduct?

    In Table 2, the no-defense Combined ASR is at most 66.8% (Llama-3.1-70B-Instruct).

    Experimental Setup

    • System and backbone: Deployed-form OpenClaw, black-box. Backbones are Llama-3.1-70B-Instruct, Qwen2.5-7B-Instruct, GPT-4o-mini. The implementation of Scenario A/C is called Clawdbot, using the 131 skills above.
    • Tasks: The main text says Scenario A simulates IPI through injections returned by external content or tool outputs, with results in Table 2; that table's title states the injection is in the step 1 tool observation. Scenario B is STM/LTM extraction and modification, 40 cases per category, 160 total. Scenario C is manipulating tool outputs to induce unauthorized follow-up actions; the table does not give its numbers separately.
    • Attack names: Table 2 lists Naive Attack, Escape Char Attack, Context Ignore Attack, Fake Completion Attack, Combined Attack. The paper does not define their construction in the main text. Table 4's title states memory modification is via DPI. Table 3 does not state which primitive is used for extraction.
    • Defenses: Table 2 uses Delimiter and Sandwich. Tables 3–4 use Delimiter and Instruction Prevention. The former does not report Instruction Prevention, and the latter does not report Sandwich.
    • Metrics: Resp Rate is triggering any skill or tool call; ASR is triggering the target skill. Extraction success means the specified short-term segment or long-term marker is retrieved. WSR means the specified marker is changed to the target marker and verified in the OpenClaw file system.
    • Judgment: Automatic rules, not an LLM review cited elsewhere in the paper. The paper does not report the number of trials N, steps T, repetitions, or agreement with human judgment.

    Main Results

    Table 2 is Clawdbot's IPI simulation. ASR is triggering the target skill. The third model in the table is written as gpt-4o-mini.

    Swipe horizontally to read the table

    Backbone modelNaive no defenseCombined no defenseCombined+DelimiterCombined+SandwichNaive+Sandwich
    Llama-3.1-70B-Instruct46.0%66.8%33.5%22.0%14.0%
    Qwen2.5-7B-Instruct34.2%52.7%25.9%17.1%10.5%
    GPT-4o-mini42.0%61.9%30.4%20.1%12.8%
    • Triggering and redirection: The authors say the attack affects which skill is triggered more than whether a tool is triggered. The authors give a Resp Rate range of 93.8%–99.0% (all Table 2 settings).
    • Attack and defense: The authors say that across the three backbones, Combined Attack has the highest ASR without defenses; Delimiter and Sandwich reduce ASR but do not eliminate it. The authors believe prompt-layer isolation alone is insufficient to fully mitigate IPI-type risks.
    • Residual range: The authors say residual ASR remains under Sandwich, giving a range of 10.5%–22.0% (Table 2).

    Memory Extraction and Modification

    40 cases per category. Extraction is in Table 3, modification WSR in Table 4. In the table below, "instruction prevention" means Instruction Prevention.

    Swipe horizontally to read the table

    Backbone modelLTM extraction no defenseLTM extraction + instruction preventionLTM modification no defenseLTM modification + instruction preventionSTM extraction no defense
    Llama-3.1-70B-Instruct62.5%18.6%71.5%20.4%41.0%
    Qwen2.5-7B-Instruct54.0%15.2%60.4%17.3%33.5%
    GPT-4o-mini59.1%17.0%66.2%19.0%38.2%
    • Long-term vs. short-term: The authors say LTM extraction success is consistently higher than STM extraction success (Table 3).
    • Defenses: The authors say both Delimiter and Instruction Prevention reduce extraction and modification, with the latter usually reducing more; even under what the authors call the strongest defense, extraction and modification still have residuals.
    • Verification method: Table 4's title states that modification requires the agent to change the specified marker via DPI, then the target marker is checked in the OpenClaw file system.

    Other Ablations and Analyses

    • Table 2 no-defense Escape Char ASR: Llama-3.1-70B-Instruct 52.5%, Qwen2.5-7B-Instruct 39.0%, gpt-4o-mini 47.6%.
    • Table 2 no-defense Context Ignore ASR: 58.4%, 44.5%, 53.2% (same model order as above).
    • Table 2 no-defense Fake Completion ASR: 55.0%, 41.8%, 50.4%.
    • Table 3 LTM-Extract under Delimiter: 28.4%, 23.7%, 26.1%; STM-Extract no defense is 41.0%, 33.5%, 38.2%.
    • Table 4 no-defense STM-Edit WSR: 57.3%, 46.1%, 52.4%; under Instruction Prevention: 16.2%, 13.0%, 15.1%.
    • Table 1 has 131 skills total: Communication/Outreach 22 (16.8%), Funds/Wallet 18 (13.7%), Data Export 20 (15.3%), Account/Permission 12 (9.2%); counts and proportions for the remaining four categories are in that table. The paper does not break down ASR by these eight categories.
  5. What are some points that can be further explored?

    The authors plan to strengthen defenses that account for both tool execution and long-range propagation, and to expand scenarios and attacker capabilities.

    Limitations and Future Directions Noted by the Authors

    The paper has no separate Limitations section. Explicit future directions are in Section 4, Conclusion and Future Work:

    • Defenses: The authors say future work will improve defenses that account for both tool execution and long-range propagation.
    • Benchmark: The authors say they will add more scenarios and attacker capabilities to PASB.

    Experimental Coverage

    • The evaluated system is deployed-form OpenClaw with backbones Llama-3.1-70B-Instruct, Qwen2.5-7B-Instruct, and GPT-4o-mini, 3 in total (Section 3.1). The implementation of Scenario A/C is called Clawdbot.
    • Section 2.4 formalizes direct prompt injection, indirect injection, tool return deception, and memory poisoning. Table 2 reports IPI in the step 1 tool observation; Table 4's modification uses DPI. Table 3 does not state the primitive for the extraction task.
    • Table 2's defenses are Delimiter and Sandwich; Tables 3–4's defenses are Delimiter and Instruction Prevention. Memory tasks have 40 cases per category, 160 total across four categories (Section 3.2).
    • Section 3.1 says each configuration has N independent trials and a fixed maximum number of steps T. The paper does not report N, T, or the number of trials for Table 2, nor LLM review or agreement with human judgment.
    • Success is determined by automatic rules; private assets are canary strings, and high-privilege operations are in an isolated sandbox (Section 3.1). The paper does not report ASR broken down by Pleak, Pact, or Ppersist. Scenario C has a design description, but the table does not give its numbers separately.
  6. Summarize the main content of the paper

    Llama-3.1-70B-Instruct without defenses Combined ASR 66.8%, LTM-Edit WSR 71.5%.

    PASB is a black-box end-to-end safety evaluation framework for real-deployment personalized agents, with the case system being OpenClaw.

    • Problem: The authors argue that continuous operation, private context, and high-privilege tools push risks from bad text to leakage, dangerous tool actions, and cross-session manipulation. Conclusions from synthetic or task-centric, instrumentable environments, the authors argue, do not transfer to such deployments.
    • Framework: Three scenario types are external content, long-term memory, skills and plugins. Four primitives are direct injection, indirect injection, tool-return deception, and memory poisoning. Success is judged by whether canaries appear, tool calls violate scenario policy, and whether harm persists after adversary stops injection. Evaluation uses automatic rules on observable trajectories.
    • IPI: Clawdbot uses 131 threat skills. Table 2 places injection in step 1's tool observation; success means step 2 calls the target skill. No-defense Combined Attack ASR is 66.8% (Llama-3.1-70B-Instruct), 52.7% (Qwen2.5-7B-Instruct), 61.9% (GPT-4o-mini). The authors say Resp Rate remains 93.8%–99.0%, and residual ASR under Sandwich is 10.5%–22.0%.
    • Memory: 40 cases per type. No-defense Llama-3.1-70B-Instruct LTM extraction success rate is 62.5%, LTM modification WSR is 71.5% (Tables 3–4). The authors say long-term memory extraction is higher than short-term memory; after Instruction Prevention, that model still has 18.6% LTM extraction success rate and 20.4% LTM modification WSR.
    • Authors' conclusions: The authors say OpenClaw has critical vulnerabilities in stages like user prompt processing, tool use, and memory retrieval, and attacks can propagate across stages and accumulate in long interactions. The authors believe that relying only on prompt-layer defenses or synthetic benchmark conclusions may not cover real personalized agent risks; future work will improve defenses balancing tool execution and long-range propagation, and expand scenarios and adversary capabilities.

Related papers

Read originalarxiv.org