acceptodds
Under review as a conference paper at ICLR 2027

From Prompt Injection to Persistent Control: Defending Agentic Workspaces Against Trojan Backdoors

Abstract

LLM agents are evolving from conversational chatbots to operational tools in real-world workspaces. In local agentic harnesses, an LLM can read and write files, call tools, and reuse workspace state across sessions. While such capabilities enhance utility, they also expose a new attack surface for attackers. Attackers can embed a prompt injection within a file or tool output. Agents may read this hidden instruction, store it, and execute it later. In this multi-step trojan attack paradigm, no individual step appears malicious on its own, but these steps can collectively turn untrusted text into persistent control content. However, existing defenses often inspect each step in isolation. As a result, they can block a clear harmful action, but fail to detect the earlier write operation that plants the backdoor. To reveal this threat, we introduce ClawTrojan, a benchmark designed to identify multi-step trojan attacks in local agentic harnesses. In a simulated local harness with GPT-6, ClawTrojan reaches an 80.7% attack success rate (ASR), while existing single-turn prompt-injection attacks produce near-zero ASR on the same model. To address this threat, we propose DASGuard, which scans control-like text in sensitive local files, traces its origin, and removes control content that does not originate from a trusted source. Our results show that DASGuard achieves strong dynamic defense by combining runtime attack blocking with sanitized commits to the workspace, limiting injected instructions’ influence on subsequent actions.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
Trojan Attacks, Agent Harness, Agent Safety

Reviews

Among:
Shape:
1234this paper, Bottom 10%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 1.67 over 3 reviews, above 10% of the others.
Reviewer_yzhFOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The authors present ClawTrojan, a benchmark for multi-step trojan attacks on agentic harnesses. Along side it they also introduce DASGuard, which is a defense system for this exact scenario. They show that commonly used methods for protecting agentic harnesses fall short on their attack benchmark, while their defensive technique prevails.

Critical strengths

For me, this paper addresses the very important and relevant issue of agent safety and security. The ClawTrojan dataset highlights a major blind-spot in current models and protections, especially with the low performance reported in Table 3. Furthermore, the DASGuard method presented shows very strong and encouraging results, however see Weaknesses. The ablation work in Table 6 is also very interesting to help isolate which components are the most impactful.

Critical weaknesses

My main concern for this paper is the co-development of a test dataset (ClawTrojan) and a defense mechanism (DASGuard) tuned to this dataset. This is particularly evident by the lack of test of DASGuard on other datasets. ClawTrojan also has a very high class imbalance, with comparatively few clean/control/borderline samples.

Multiple practical details are unclear for me:

  • The precise attack and defense conditions are not clear to me. Is ClawTrojan focused on code contributors in projects? Can it also target external black-box agents? How is DASGuard integrated? Do you need full harness access (so limited to open source harnesses), or would it also work on proprietary harnesses?
  • How is the DASGuard threshold established?
  • It is not clear what base model was used when testing all the defense mechanisms in Table 3, and how the change of model impacts the performance of DASGuard and others. Although GPT 5.4 is stated as the base model used, I assume this is the one used for the defenses? However the table contains 5.6 and 5.6 is also reused in Table 4. A consistent model would improve the quality of the comparisons

Presentation: Generally understandable, but some sections could benefit from clearer writing (Sec. 4.2, 5) as they are not always easy to follow. A lot of notation and symbols are introduced in the equations but have little to no reuse. Also, Figure 1 has contradictory numbering and arrow orderings.

Section 5.1: is there a word missing? "records [how] that content is derived" (L.269)

Questions for authors
  1. The main differentiation factor of ClawTrojan with existing benchmarks presented in Table 2 is Dialog, especially with AgentDojo. It is not clear to me how this category nuances from "Step chain" described as multi-step processes. If the authors could explicitate this please?

  2. The authors distinguish "partial verdicts", where the final attack is blocked but unsafe residue remains. I think this is a direction that needs to be explored more when presenting a multi-step attack and defense setting. What remains? How dangerous is it? how easy is it to reuse? etc.

  3. As mentioned above, was DASGuard tested on other datasets?

Smaller concerns:

  • Could you provide a point of comparison for the values in Table 5, such as the results from CaMeL please?
  • How is time translated to cost? I would like to see a cost/performance graph. I am also not clear on the time column in Table 3, if it represents additional run time or total time? (which would surprise me as raw-agents times are usually longer)
Reviewer_bQaAOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
1
Soundness
2
Read review
Paper summary

The paper focused on the "multi-step trojan attack" in which the attacker place multiple "natural-looking" modifications to achieve the goal and this kind of attack is not well exposed by existing prompt-attack datasets. So the paper proposed ClawTrojan, a benchmark for multi-step trojan attacks. The benchmark consists of 362 samples spanning multiple scenarios (Coding, Office, etc.), multi-step injection mechanisms (mixed-source, tool-return, etc.) and attacker goals (Unauth. disclosure, Task deviation, etc.). Besides, the paper proposed a defense method, DASGuard to mitigate this threat. DASGuard basically will evaluate the operation of the agent's every step to block, preserve or sanitize. It will calculate scores based on weighting several factors (sources of content, destinations, roles, authorization status, detector evidences and runtime contexts) and use the score to decide the defense action on the current operation. The experiments show that the ClawTrojan benchmark could show obvious risks of current agents and the DASGuard could alleviate the risks, compared to the other defense methods.

Critical strengths
  1. I am impressed by the fact that ClawTrojan benchmark could expose the risks that the old benchmarks can't. It's true that existing benchmarks are built on toy environments and tasks and it's good to see the authors build the benchmark to focus on real agents and show high ASR on them.

  2. The authors reproduced the existing defense methods on real agents, which is a good contribution.

Critical weaknesses
  1. Poor writing. The paper mainly explained two things, but neither was clearly stated. The ClawTrojan benchmark shows the resulting distribution on outcomes, mechanisms and scenarios, which is good. But the authors didn't explain how does the benchmark constructed. The appendix partly explained this by saying that they used human annotators and LLM workers to "draft and repair samples". So what is the prompt to the LLM workers? How could the authors assure the quality of the human annotators? For the DASGuard, the mechanism of this method is hard to understand. In the equation 3, the authors used Attr(f), but in the equation 4, they used \phi_attr(f) instead and no relation equation was stated between these and I may guess they are the same thing when reading the paper. What's more, in equation 5, the definition equations of Protected(f,at)Protected(f, a_t) and Auth(f)Auth(f) were not stated.

  2. Doubtful setting of the experiments. First, about the weights, the DASGuard calculates several scores based on weighting. But the authors never explained why they choose to set the weights as the paper stated. Also it's problematic if we test the DASGuard on other distributions, in which the samples could cause slightly below the threshold while at risk. Hard-coded weights may be not a good idea and it may be coincidentally that the DASGuard work well in the current setting. Second, about the multi-step setting. The paper mainly focused on multi-step setting. But it seems the steps of one sample is only about 5 (1672/362), which is not that long.

Questions for authors
  1. I am doubtful about the high ASR on native Codex. What is the setting of using the codex? Like the reasoning effort, permission mode (by-pass or auto).

  2. Like what I have said, how on earth does the DASGuard work? Please formulate the equations appropriately, make sure your annotations is correct and consistent.

Reviewer_YE83OpenReview ↗
Rating
1
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This paper looks at a very timely security problem in local agentic harnesses (like OpenClaw or Codex-style coding agents) where agents read/write local files and keep memory across turns. The authors show that while recent frontier models easily shrug off classic single-turn prompt injections (getting 0% ASR on AgentDojo and InjecAgent), they are still super vulnerable to multi-step trojan attacks where benign-looking rules get planted into workspace files or memory and triggered later. To study this, the paper introduces a new benchmark called Claw Trojan (362 trajectories / 1,672 steps) and proposes DASGuard, a runtime defense that tracks data provenance, detects control-like text spans, and sanitizes file edits on a shadow copy before committing them to the workspace.

Critical strengths
  • Spot-on problem formulation: Moving from single-turn context injection to persistent workspace poisoning (trust laundering, fragmented rules across files, delayed triggers) makes a lot of sense given how people actually use CLI coding and personal agents today.

  • Thoughtful benchmark structure: Claw Trojan is nicely organized with clear schemas, diverse outcome/mechanism splits, explicit is_last_chance annotations, and self-contained sandbox snapshots that make step-level evaluation easy to run.

Critical weaknesses
  • The "full-chain" evaluation doesn't actually propagate state across steps: The main paper heavily sells the idea of defending persistent state across turns and reports Full-Chain ASR. While appendices B.3 and E.1 quietly admit that every single step is evaluated from an independently initialized, pre-baked snapshot rather than replaying a continuous trajectory where earlier edits/sanitizations actually carry over to later steps. If step tt just loads a hardcoded poisoned snapshot regardless of what DASGuard sanitized at step t−1t-1, you aren't really testing live cross-step persistence. This also explains why dropping cross-step state in Table 6 barely hurts ASR (+4.3%), whereas dropping source labels completely breaks the defense (+76.9%).

  • Rule-based heuristics under going: Despite the formal notation in Section 5, Appendix B.5 reveals that DASGuard relies on manually fixed constant weights (Table 10), regexes, and cosine similarity against a tiny bank of just 13 hardcoded example sentences—which feels quite brittle against simple paraphrasing or adaptive attacks (which aren't evaluated).

  • Unverified third-party model endpoints: Appendix E.1 explicitly states that the headline models (gpt-6-luna, gpt-5.6-terra, deepseek-v4.1-flash, glm-5.3-flash) were accessed via a shared OpenAI-compatible endpoint whose "underlying weights and routing are not independently verified". Relying on an unverified proxy endpoint for headline benchmark claims makes the empirical comparisons across models hard to trust and reproduce.

Questions for authors

Clarify W1, W2, and provide detailed information on the shared endpoint to make sure its reliability (W3).

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.