RedTeamCUA: realistic adversarial testing of computer-use agents in hybrid Web-OS environmentsRedTeamCUA: Realistic Adversarial Testing of Computer-Use Agents in Hybrid Web-OS Environments
The authors build the hybrid Web-OS sandbox RedTeamCUA and the 864-case benchmark RTC-Bench to evaluate CUA indirect prompt injection risks, and state that frontier CUAs are generally vulnerable.
- Computer-use agents (CUAs) face the risk of indirect prompt injection, but existing evaluations either use unrealistic or uncontrolled environments, or cover only pure Web or pure OS, lacking controlled evaluation of hybrid Web-OS attack scenarios.
- The authors build the hybrid sandbox RedTeamCUA, combining OSWorld virtual machines with Docker webpage copies from WebArena/TheAgentCompany, supporting automated injection and Decoupled Eval that starts testing directly from the injection point; they also build the 864-example benchmark RTC-Bench, measuring ASR with an execution-based evaluator and AR with a GPT-4o judge.
- Under Decoupled Eval, GPT-4o has an average ASR of 66.19%, with Operator lowest at 7.57%, and AR is generally higher than ASR (GPT-4o reaches 92.45%); under End2End, the ASR of Claude 4.5 Opus | CUA is 83% and that of Claude 4.6 Opus | CUA is 50%; all four defenses are insufficient, with detection at most 30%.
- The authors note: injection depends on fixed filenames; only the Web→OS and Web→OS→Web paths and a single injection point are covered; the Decoupled setting is limited to 10 steps, which limits the evaluation of utility (SR). Defenses and the End2End evaluation use only 50 high-risk examples.
- Threat model
- Indirect prompt injection: the attacker cannot access or modify the user's original instructions, the agent's prompt, components, or model weights, and can only inject content into locations on webpages that normally allow text input (Forum comments, RocketChat messages, OwnCloud shared files); the injection is mixed with the context of the expected user query to induce the CUA to execute harmful tasks on the local OS.
- Evaluated models
- GPT-4oClaude 3.5 Sonnet (v2)Claude 3.7 SonnetClaude 3.5 Sonnet | CUAClaude 3.7 Sonnet | CUAOperatorOperator (w/o checks)Claude 4 Opus | CUAClaude 4.5 Sonnet | CUAClaude 4.5 Opus | CUAClaude 4.6 Opus | CUALlamaFirewallPromptArmorMeta SecAlign
- Benchmarks
- RTC-BenchRedTeamCUA(基于 OSWorld、WebArena、TheAgentCompany 的混合沙盒)
- Metrics
- ASRARSR检测准确率
The researchers propose RedTeamCUA, an adversarial testing framework that combines an OSWorld-based virtual machine OS environment with the Docker web platforms of WebArena and TheAgentCompany, and construct RTC-Bench, containing 864 examples, to evaluate the risk of computer-use agents (CUAs) facing indirect prompt injection. The benchmark consists of 9 normal goals, 24 adversarial goals based on the CIA triad, and combinations of two levels of instruction specificity and two injection forms. Under the Decoupled Eval setting, the attack success rate of various frontier CUAs reaches up to 66.2%, with Claude 3.7 Sonnet | CUA at 42.9% and Operator at 7.6%; the attempt rate reaches up to 92.5%, higher than the attack success rate. Under the End2End setting, which is closer to real-world use, the attack success rate of Claude 4.5 Opus | CUA is 83%, and that of Claude 4.6 Opus | CUA is 50%.
Why it was selectedThe 864-example benchmark covers cross-environment injection paths across Web and OS, and provides the ASR and attempt rates of multiple frontier CUAs, facilitating comparison of gaps in existing guardrails.
Paper analysis
What problem does this paper attempt to solve?
How to systematically evaluate the indirect prompt injection risks faced by CUAs in a realistic but controlled hybrid Web-OS environment.
Core problem: there is a lack of frameworks and benchmarks for systematically adversarially testing indirect prompt injection against computer-use agents (CUAs) in realistic but controlled hybrid Web-OS environments.
- Scenario and importance: CUAs can automatically operate across OS and Web, but LLMs struggle to distinguish trusted user instructions from untrusted data; attackers can embed malicious instructions in webpage content to hijack the agent and exploit its OS-level operation permissions to cause real harm (§1).
- Existing shortcomings (per the authors): existing evaluations have four types of deficiencies—unrealistic threat models (assuming the attacker fully controls the webpage), difficulty balancing safety and realism (non-interactive tool environments or direct testing in real environments), coverage of only Web-side harms, and lack of support for hybrid attacks across Web-OS (§2.2).
- Core observation: OSWorld provides a real VM but the browser is unrestricted; WebArena/TheAgentCompany provide isolated webpage copies but no OS; the authors believe combining the two can achieve both realism and safety, and use Decoupled Eval to decouple adversarial robustness from CUA navigation capability (§3).
- Paper outputs: proposes the adversarial testing framework RedTeamCUA and the 864-example benchmark RTC-Bench, and evaluates frontier CUAs with an execution-based evaluator (ASR) and an LLM judge (AR) (§4, §5).
- Threat model (§4.2):
- Goal: through malicious content embedded in webpages, make the agent deviate from the benign goal and execute harmful tasks on the user's local OS.
- Knowledge: the attacker does not know the user's specific instructions and can only mix the injected content with the context of the expected user query.
- Capability: cannot access or modify the user's original instructions, the agent's prompt, components, or model weights; can only inject text into locations on webpages that normally allow text input (Forum comments, RocketChat messages, OwnCloud shared files).
- Victim system: frontier CUAs running in the hybrid sandbox with OS operation permissions.
What related research exists?
Related work falls into four categories: simulation/tool environments, capability sandboxes, Web-side adversarial benchmarks, and OS-side benchmarks; the authors state that none supports controlled hybrid Web-OS adversarial testing.
Simulation and tool-use environments
- ToolEmu (Ruan et al., 2024), InjecAgent (Zhan et al., 2024), AgentDojo (Debenedetti et al., 2024)—safely explore injection risks in non-interactive tool-use environments; the authors point out that they are disconnected from real computer-use scenarios.
- τ-Bench (Yao et al., 2025), HAICOSYSTEM (Zhou et al., 2024b)—tool-use and social simulation environments, marked in Table 6 as not supporting adversarial injection.
CUA capability evaluation sandboxes
- OSWorld (Xie et al., 2024; 2025) and WindowsAgentArena (Bonatti et al., 2024)—VM-interactive desktop environments; the authors point out that their browsers can access real websites, so Web-side adversarial testing cannot be done safely.
- WebArena (Zhou et al., 2024a), VisualWebArena (Koh et al., 2024), TheAgentCompany (Xu et al., 2024), REAL (Garg et al., 2025)—isolated web copies; the authors point out that they lack OS environment integration.
Web-side adversarial testing benchmarks
- VWA-Adv (Wu et al., 2025)—uses trigger text/images for indirect injection on VisualWebArena; the authors point out that its adversarial goals are limited to Illusioning and Goal Misdirection, with a narrow scope of harm.
- WASP (Evtimov et al., 2025)—a text injection and restricted-attacker setting similar to this paper, but the authors point out that it is limited to Web scenarios.
- DoomArena (Boisvert et al., 2025)—a modular adversarial framework including an OSWorld implementation; the authors point out that its OS part is currently limited to popup attacks and does not support cross-environment hybrid scenarios.
- SafeArena (Tur et al., 2025)—evaluates users' directly harmful requests; the authors point out that it cannot evaluate indirect prompt injection.
OS-side security benchmarks
- OS-Harm (Kuntz et al., 2025)—evaluates OS-level harm based on OSWorld, including hybrid scenarios; the authors point out that its browser is not isolated and that it relies on an LM judge that may itself be misled by the injection.
Baselines and comparisons: this paper has no attack-method baseline (the injection strategy is a fixed template); defense comparisons include LlamaFirewall, PromptArmor, defensive system prompts, and Meta SecAlign 70B; framework-level comparisons are in Table 6, and the authors state that RedTeamCUA is the only framework that simultaneously has all six features: adversarial examples, injection support, interactive interface, isolated Web, desktop OS integration, and hybrid interaction (Table 6).
How does the paper address this problem?
Build a hybrid sandbox with OSWorld virtual machines plus Docker webpage copies, then construct an 864-example benchmark using the CIA triad, and evaluate with dual metrics: execution-based evaluation and LLM judging.
Overall approach: build the RedTeamCUA hybrid sandbox, combining a real VM OS environment with isolated Docker web copies, construct the RTC-Bench benchmark on it, and use an execution-based evaluator to determine whether an attack succeeds.
Sandbox construction (§3.1)
- OS side: use OSWorld as the backbone, providing an Ubuntu VM (Terminal, File Manager, VSCode, etc.), leveraging its host isolation and snapshot reset to ensure safety and reproducibility.
- Web side: connect the self-hosted web copies of WebArena and TheAgentCompany, selecting three platforms: OwnCloud (cloud office), Forum (Reddit-style forum), and RocketChat (instant messaging), accessed via HTTP through the OSWorld browser.
- Rationale for selection: the three platforms correspond to the typical usage of "obtaining knowledge from the web and then executing locally," covering three attack surfaces: forum posts, private messages, and shared files.
Two core features (§3.1)
- Configurable automated injection: extend the OSWorld configuration to support defining injection content and targets, specifying SQL commands, and uploading target files; write injection scripts for each platform that directly modify the platform database to ensure the injection persists after task initialization.
- Decoupled Eval: preliminary experiments found that GPT-4o often cannot navigate to the web pages containing the injection; this setting uses preprocessing actions to place the agent directly at the injection point, separating adversarial robustness from navigation capability. There is also an End2End setting, in which the agent starts from the initial task state.
RTC-Bench benchmark construction (§4)
- Benign goals: 3 categories (software installation, system configuration, project setup) × 3 = 9; each has two levels of instruction specificity: General (vague) and Specific (detailed).
- Adversarial goals: 24 goals designed according to the CIA triad—Confidentiality is Web→OS→Web data exfiltration, and Integrity and Availability are Web→OS local sabotage; each goal has two injection forms: natural language and code.
- Scale: 9 × 24 × 4 (2 instruction specificity levels × 2 injection types) = 864 cases.
- Injection strategy: prepend an "important message" prompt before the adversarial instruction, followed by a deceptive rationale adapted to the environment and task context, making the agent believe the adversarial goal is a prerequisite for completing the current task (a complete example is given in Appendix B.4).
Evaluation method (§5.1)
- ASR: use example-specific execution-based evaluation scripts to determine whether the adversarial goal is achieved; the authors state that this is less susceptible to being misled by injection than OS-Harm's LM judge.
- AR: use GPT-4o as a fine-grained LLM-as-a-Judge to determine whether the trajectory contains an attempt to pursue the adversarial goal (regardless of completion); the prompt is in Appendix J.
- Procedure: each case is run 3 times, and the attack is recorded as successful if any run succeeds; screenshot observation is used by default; the Decoupled setting is limited to 10 steps and End2End to 50 steps, at 1080p resolution (Appendix E).
What experiments did the paper conduct?
7 frontier CUAs were tested for ASR/AR on 864 cases, and 4 defenses and 5 newer CUAs under the End2End setting were also tested; the authors state that vulnerabilities are widespread and defenses are insufficient.
Experimental setup
- CUAs under test (§5.1): 3 Adapted LLM-based Agents (GPT-4o, Claude 3.5 Sonnet (v2), Claude 3.7 Sonnet, using OSWorld's default pyautogui scaffold); 3 Specialized CUAs (Operator, Claude 3.5 Sonnet | CUA, Claude 3.7 Sonnet | CUA, using GPT-4o to convert native actions into pyautogui); plus an Operator (w/o checks) variant simulating inattentive human supervision. The End2End experiments additionally add Claude 4 Opus / 4.5 Sonnet / 4.5 Opus / 4.6 Opus | CUA.
- Benchmark: RTC-Bench, 864 examples, covering the three platforms OwnCloud, Forum (called Reddit in the tables), and RocketChat, and the three CIA goal types.
- Metrics: ASR (execution-based evaluator), AR (GPT-4o fine-grained judge), SR (benign task success rate).
- Protocol: default Decoupled Eval, screenshot observation, 3 runs per example, any success counted as success; a sanity check before experiments confirms each CUA can complete benign tasks without injection.
- Defense evaluation: the 50 high-risk examples with the highest ASR in §5 are taken to test LlamaFirewall, PromptArmor, defensive system prompts, and Meta SecAlign 70B.
- The paper does not report the agreement between AR judging and human judgment.
Main results
Average ASR and AR of each CUA under Decoupled Eval (%, per Table 1; 3 runs per example, any success counted):
CUA Average ASR Average AR GPT-4o 66.19 92.45 Claude 3.5 Sonnet 41.37 64.27 Claude 3.7 Sonnet 39.33 58.99 Claude 3.5 Sonnet | CUA 31.21 74.43 Claude 3.7 Sonnet | CUA 42.93 64.39 Operator (w/o checks) 30.89 47.84 Operator 7.57 14.06 - Authors' interpretation: all CUAs under test are vulnerable to injection; AR is consistently higher than ASR, and the authors believe failures are mostly due to insufficient capability rather than robustness, and that future capability improvements may amplify the risk.
- Platform differences: RocketChat has consistently the highest ASR; the authors attribute this to the agent's higher implicit trust in private message content and to exfiltrated data better matching the platform's purpose (§5.2).
- Goal type differences: Figure 2 shows Integrity-type ASR is highest and Confidentiality lowest; the authors attribute this to differing task complexity (deleting files is simple, exfiltration requires multi-step operations).
Defense evaluation (Appendix H, 50 high-risk examples)
- Injection detection: LlamaFirewall detects 0%; PromptArmor's variants reach at most 30% (GPT-4o+screenshot), the rest 2%–28% (Table 7). The authors state that existing detection is insufficient for the contextualized injections in this benchmark.
- Defensive system prompts: Figure 8 shows they reduce ASR by nearly half, but the ASR of Claude 3.7 Sonnet | CUA and Operator (w/o checks) remains around 50% (n=50).
- Model-level defenses: Meta SecAlign 70B has AR 52%, ASR 32%, and benign SR only 68%; the authors believe building base models that are both safe and capable remains difficult.
End2End evaluation (§7, also 50 examples, trajectories manually checked)
- Results: Operator 10%, Operator (w/o checks) 42%, Claude 3.7 Sonnet | CUA 50%, Claude 4 Opus | CUA 48%, Claude 4.5 Sonnet | CUA 60%, Claude 4.5 Opus | CUA 83% (38/46), Claude 4.6 Opus | CUA 50% (Table 3, Figure 3).
- Authors' interpretation: more capable CUAs overcome navigation and completion limits, yielding higher ASR; Claude 4.6 Opus | CUA proactively identifies the injection in 25 of 50 examples (4.5 Opus only 3), which the authors call meaningful progress but 50% ASR remains unreliable.
- Setting comparison: Table 2 shows the ASR differences between Decoupled and End2End (e.g., Operator 46.0 vs 10.0, Claude 3.7 Sonnet | CUA 100.0 vs 50.0), which the authors attribute to navigation capability limits.
Other ablations and analyses
- Instruction specificity (Table 8): General instructions have consistently higher ASR/AR than Specific; the Pointer usage (only collecting information, not executing) sharply lowers ASR (e.g., Claude 3.7 Sonnet | CUA is 0.00).
- Injection modality (Table 8): code injection is more effective on OwnCloud, language injection is more effective on RocketChat, and on Forum the two are similar.
- Observation type (Table 10): screenshot+a11y tree lowers ASR/AR for most CUAs (e.g., GPT-4o ASR 66.19→54.17), but Operator is an exception (7.57→8.45); SR also generally decreases (Table 9).
- File type (Figure 9): Normal files have the highest ASR and System Info the lowest; the authors suggest CUAs may implicitly recognize the criticality of system files.
- Utility under attack (Table 11, Appendix I.4): under End2End, benign tasks are also completed when the attack succeeds; under Decoupled, Specialized CUAs have low SR, which the authors attribute to the 10-step limit and the atomic action design.
- Multiple runs (Tables 12, 13): some tasks succeed in all three runs (e.g., GPT-4o's average ASR is still 42.33%), and the authors state these persistent risks require further study.
What are some points that can be further explored?
The authors list three types of limitations: filename dependence, coverage of attack paths and injection points, and step budget; the defense and End2End evaluations are based on only 50 high-risk examples.
Limitations and future directions noted by the authors
- File-name dependence (Appendix A): file-based adversarial tasks specify concrete file names in the injection; the authors state this is necessary for reproducible evaluation and that file names are realistically guessable, but they encourage future exploration of more general adversarial goals and injection strategies that do not depend on fixed file names.
- Attack path coverage (Appendix A): only Web→OS and Web→OS→Web were studied; OS→Web and Web→Web paths were not modeled.
- Injection strategies and noise (Appendix A): contextualized injection strategies and methods beyond the Code/Language two types were not explored; each environment used only a single injection point, and the effect of environment noise (e.g., extra RocketChat messages, more complex file systems) was not examined.
- Cost constraints (Appendix A): the adversarial experiments in the Decoupled setting ran only 10 steps, with many steps consumed by safety mechanisms or adversarial goals, limiting adequate evaluation of utility under attack (SR); Appendix I.4 suggests raising the step limit in the future and weighing the cost.
- Open-source plan (Reproducibility Statement): the authors plan to open-source the sandbox, benchmark, and all CUA run code upon acceptance.
Scope of experimental coverage
- The main experiments tested 7 CUAs in total (including the Operator (w/o checks) variant), all closed-source frontier CUAs; the authors state that open-source CUAs such as UI-TARS 1.5 7B were not included because their capabilities are insufficient (difficulty completing basic operations such as navigation) (§5.1).
- Both the defense evaluation and the End2End evaluation used only the 50 high-risk cases with the highest ASR (Appendix H, §7); End2End additionally added 4 Claude 4.x series CUAs.
- Each case was run 3 times, and the attack was recorded as successful if any run succeeded; Decoupled was limited to 10 steps and End2End to 50 steps (Appendix E).
- AR was judged by GPT-4o, and the paper does not report its agreement with human judgment; End2End results were classified by manual inspection of each trajectory (Appendix I.6).
- Benign scenarios were fixed at 3 categories with 9 goals and 3 web platforms (OwnCloud, Forum, RocketChat), with OS limited to Ubuntu (§3.1, §4.1).
Summarize the main content of the paper
A hybrid Web-OS sandbox plus an 864-example benchmark; the authors state that frontier CUAs are generally vulnerable to indirect prompt injection and that existing defenses are all insufficient.
A CUA safety evaluation paper: addressing the lack of a realistic and controlled hybrid Web-OS evaluation environment for indirect prompt injection, the authors propose the adversarial testing framework RedTeamCUA and the benchmark RTC-Bench.
- Method: the sandbox combines OSWorld's Ubuntu VM with Docker web copies from WebArena/TheAgentCompany (OwnCloud, Forum, RocketChat), supporting automated injection and Decoupled Eval that starts directly from the injection point; the benchmark consists of 9 benign goals × 24 CIA adversarial goals × 4 instantiations, totaling 864 cases, with ASR measured by an execution-based evaluator and AR judged by GPT-4o.
- Main results (Decoupled Eval, Table 1): GPT-4o has the highest average ASR at 66.19%, and Operator the lowest at 7.57%; AR is consistently higher than ASR, with GPT-4o reaching 92.45%, and the authors believe failures mostly stem from insufficient capability rather than robustness.
- End2End (Table 3, 50 cases): the ASR of Claude 4.5 Opus | CUA is 83%, and the latest Claude 4.6 Opus | CUA still has 50%; the authors state that more capable CUAs have higher ASR because they can complete navigation and attack steps, and the threat is no longer hypothetical.
- Defenses (Appendix H): LlamaFirewall has a detection rate of 0%, PromptArmor at most 30%, and defensive system prompts and Meta SecAlign 70B also cannot provide sufficient protection.
- Authors' conclusion: if CUA capability improvements are not accompanied by strengthened defenses, risks will be amplified, and CUA-specific defenses are urgently needed; RedTeamCUA and RTC-Bench can serve as a framework for continued research, and the authors plan to open-source them upon acceptance.