CaMeLs Can Use Computers Too: System-level Security for Computer Use Agents

Hanna Foerster, Tom Blanchard, Kristina Nikolić, Ilia Shumailov, Cheng Zhang, Robert Mullins, Nicolas Papernot, Florian Tramèr, Yiren Zhao

Abstract

AI agents are vulnerable to prompt injection attacks, where malicious content hijacks agent behavior to steal credentials or cause financial loss. We introduce Single-Shot Planning for Computer Use Agents (CUAs), an architectural isolation defense that strictly separates trusted task planning from untrusted environment observations. By generating a complete execution graph before observing potentially malicious content, we provide provable control flow integrity. Our evaluation on the OSWorld benchmark demonstrates that this design retains up to 57% of the performance of frontier models while improving the performance of smaller open-source models by up to 19%.

Introduction

Computer Use Agents (CUAs) automate tasks by interacting with user interfaces, viewing screenshots, and executing actions. However, they are highly susceptible to prompt injection. If an agent visits a malicious website, the text or hidden metadata on that page can hijack the agent's logic, forcing it to perform harmful actions. The gold standard for defense is the Dual-LLM architecture, which separates a "Privileged Planner" from a "Quarantined Perception" model. However, standard CUAs rely on a tight feedback loop that is fundamentally incompatible with this isolation. This paper resolves this tension by demonstrating that UI workflows are structurally predictable.

Architecture and Methodology

We propose a system-level defense based on the Observe-Verify-Act paradigm and a novel planning mechanism.

Dual-LLM for CUAs

Our architecture splits the agent into two distinct components:

  1. Privileged Planner (P-LLM): A trusted model that never sees raw environment data. It handles high-level reasoning and task decomposition.
  2. Quarantined Perception (Q-VLM): An isolated model that processes untrusted screenshots and DOM trees to identify UI elements.
The Single-Shot Planning architecture separates the trusted Planner LLM from the Interpreter with Tools, ensuring control flow integrity by generating plans before observation.

Single-Shot Planning

Instead of deciding actions one step at a time, the P-LLM generates a comprehensive, conditional execution graph (similar to a Python script with if/else branches) upfront. It anticipates potential UI states—such as cookie banners or login prompts—before any untrusted data is processed. This ensures that the agent's control flow remains under the user's intended path.

Redundancy Defenses

To prevent "Branch Steering" (where an attacker manipulates the UI to trigger a specific valid path), we implement DOM Consistency checks and Multi-Modal Consensus. These mechanisms use independent models to cross-check findings, flagging discrepancies that might indicate an attack.

Key Results and Insights

We evaluated our system using OSWorld, a benchmark for agents performing tasks across desktop applications like Chrome and LibreOffice.

  • Utility Retention: Frontier models like GPT-4o (used as planners) retained 57% of their original success rate while operating under the secured architecture.
  • Performance Gains for Small Models: Surprisingly, the structured planning required for security improved the performance of smaller open-source models (e.g., UITars-7B) by up to 19%. The rigorous "Observe-Verify-Act" logic reduced hallucinations and reactive errors.
  • Benchmark Success: The "CaMeL+UITars" setup achieved a 29.0% success rate on OSWorld, outperforming the standalone model (24.4%).

Discussion and Limitations

While Single-Shot Planning provides robust Control Flow Integrity, it faces challenges with Plan Rigidity. If a UI is completely unexpected, the agent may get stuck because it cannot adapt mid-flight. Furthermore, while we mitigate Branch Steering, pixel-perfect adversarial attacks can still bypass probabilistic checks. Future work is needed to develop more robust semantic security policies that understand the intent behind UI interactions.

Conclusion

CaMeLs demonstrates that rigorous security and utility can coexist in CUAs. By leveraging the structural predictability of UI workflows, we can protect agents from prompt injection without sacrificing the performance of the underlying models.

Summary updated

BibTeX
@inproceedings{foerster2026camels,
  author = {Hanna Foerster and Tom Blanchard and Kristina Nikolić and Ilia Shumailov and Cheng Zhang and Robert Mullins and Nicolas Papernot and Florian Tramèr and Yiren Zhao},
  title = {{CaMeLs Can Use Computers Too: System-level Security for Computer Use Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=86w8zzGKec},
}
Figure