Atomicity for Agents: Exposing, Exploiting, and Mitigating TOCTOU Vulnerabilities in Browser-Use Agents

Linxi Jiang , Zhijie Liu , Haotian Luo , Zhiqiang Lin [0.25em] The Ohio State University · 2026

Read Atomicity for Agents: Exposing, Exploiting, and Mitigating TOCTOU Vulnerabilities in Browser-Use Agents by Linxi Jiang , Zhijie Liu , Haotian Luo , Zhiqiang Lin [0.25em] The Ohio State University (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2603-00476.txt.

Introduction

Jiang and three colleagues expose a timing flaw in browser use agents, where pages change between planning and action so agents act on stale assumptions. They frame this check to use gap as a TOCTOU security flaw and test ten popular open agents across synthetic and real sites, finding the flaw widespread. Dynamic or hostile page content can exploit the gap to trigger unintended actions. A light fix that watches page changes during planning and rechecks state just before acting cuts insecure execution and side effects.

Catalog record

CREATORLinxi Jiang , Zhijie Liu , Haotian Luo , Zhiqiang Lin [0.25em] The Ohio State University
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE71490
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2603.00476

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Atomicity for Agents: Exposing, Exploiting, and Mitigating TOCTOU Vulnerabilities in Browser-Use Agents Linxi Jiang , Zhijie Liu , Haotian Luo , Zhiqiang Lin [0.25em] The Ohio State University Abstract Browser-use agents are widely used for everyday tasks. They enable automated interaction with web pages through structured DOM based interfaces or vision language models operating on page screenshots. However, web pages often change between planning and execution, causing agents to execute actions based on stale assumptions. We view this temporal mismatch as a time of check to time of use (TOCTOU) vulnerability in browser-use agents. Dynamic or adversarial web content can exploit this window to induce unintended actions. We present a large scale empirical study of TOCTOU vulnerabilities in browser-use agents using a benchmark that spans synthesized and real world websites. Using this benchmark, we evaluate 10 popular open source agents and show that TOCTOU vulnerabilities are widespread. We design a lightweight mitigation based on pre-execution validation. It monitors DOM and layout changes during planning and validates the page state immediately before action execution. This approach reduces the risk of insecure execution and mitigates unintended side effects in browser-use agents. * * footnotetext: Equal contribution. 1 Introduction Browser-use agents are increasingly used to automate everyday web tasks such as search, form filling, online shopping, and account management [ 24 , 37 , 26 ] . A growing number of open-source systems, including Browser-Use [ 23 ] , Midscene [ 35 ] , and UI-TARS [ 30 ] , provide practical frameworks for web automation. In parallel, major companies have started shipping products with built-in web agents, such as ChatGPT Atlas with agent mode for browsing and task completion [ 27 ] . These agents typically operate by observing the current web page, planning the next action based on this observation, and then acting on the page [ 38 , 32 ] . Figure 1 : A real-world TOCTOU example on the Forbes homepage. The green region indicates the intended target area at t_{1} . A delayed advertisement overlay (red region) appears at t_{2} and overlaps the target, so a subsequent click at t_{3} can become an unintended ad click that redirects to an advertisement page. Despite their rapid adoption, browser-use agents still face significant security challenges in everyday use, particularly on dynamic websites. Across agent designs lies a shared and fragile assumption: the page state the agent checked during planning remains valid when the planned action is dispatched. Many modern sites update their layout or content shortly after the initial page load due to advertisements or delayed components [ 22 , 18 ] . Figure 1 illustrates a representative example from the Forbes homepage 1 1 1 https://www.forbes.com/ . At time t_{1} , the page finishes its initial render and exposes a normal reading interface; the green region marks the area the user intends to click (e.g., to continue reading). Shortly after, at time t_{2} , the site loads an advertisement overlay asynchronously, which is common on modern websites. The red region denotes the overlay area, and it partially overlaps the original target region. When the agent eventually clicks on the advertisement at time t_{3} , the click can land on the overlaid ad instead of the original target, triggering an unintended click on the ad and redirecting the agent to an advertisement page. For human users, such changes are easy to notice and avoid. For browser-use agents, however, the temporal gap between planning and execution can silently invalidate planning-time assumptions, allowing an uncooperative or dynamically changing page to hijack the agent’s intended action without compromising the agent or browser. More generally, this behavior arises from the latency between observation and action in browser-use agents. After observing a page, agents often rely on a large language model (LLM) to reason about the next action. This reasoning introduces a non negligible delay before execution. We refer to the resulting temporal mismatch as a time of check to time of use (TOCTOU) vulnerability in browser-use agents. During this window, the page state can change after the agent checks it during planning and before the action is executed [ 6 , 31 ] . In this work, we systematically study TOCTOU vulnerabilities in browser-use agents. Our goal is to understand whether and how the temporal misalignment between planning and execution can be exploited to cause unintended and insecure execution behavior. To support this study, we construct DynWeb , a benchmark that enables controlled and reproducible evaluation of TOCTOU vulnerabilities. DynWeb includes both synthesized pages and real world websites. It covers three representative categories of page dynamics. These include changes to visible UI elements, updates to dynamic page content such as prices or availability, and interactions with expiring page states such as sessions or one time inputs. Each category can expose TOCTOU vulnerabilities in practice. Using DynWeb , we evaluate 10 popular open source browser-use agents with different observation modalities. These include structured page representations and screenshots. We also consider different action spaces, including element level operations and human-like interactions. Our evaluation shows that TOCTOU vulnerabilities occur broadly across the evaluated agents. This result indicates that changes between check time during planning and use time during execution form a general and triggerable execution time attack surface, rather than an artifact of specific websites. Based on these findings, we design a lightweight mitigation that keeps check-time assumptions aligned with use-time execution without overhauling existing agents. The core mechanism is pre-execution validation . During planning, the system attaches DOM and layout monitors that record structural edits, attribute updates, and layout shifts. Immediately before an action is executed, the validator inspects these records to determine whether the page has changed in ways that could affect the pending action. If the page remains stable, the action proceeds. If changes are detected, the action is aborted and the user is notified of the modification. This design reduces the practical TOCTOU window from seconds of agent planning time to the hundred-millisecond scale delay between validation and execution, while adding negligible runtime overhead. Contributions. This paper makes the following contributions: • We identify a TOCTOU window in browser-use agents as a common source of exploitable vulnerabilities under dynamic web conditions. • We introduce DynWeb , a benchmark of synthesized and real world web scenarios, and empirically evaluate 10 open source browser-use agents, demonstrating that TOCTOU vulnerabilities are widespread across agents. • We design a lightweight mitigation based on pre-execution validation and show that it substantially reduces unintended and insecure execution under dynamic web conditions. 2 Background 2.1 Browser-Use and Web Agents Recent work has explored LLM based agents that interact with web environments as a testbed for complex decision making and tool use. Benchmarks such as Mind2Web [ 10 ] and WebArena [ 40 ] , along with more recent evaluation suites [ 11 , 16 , 17 , 19 ] , evaluate agent behavior across diverse websites, page structures, and task specifications. In parallel, a growing number of systems provide practical frameworks for browser automation, including Browser-Use [ 23 ] , Midscene [ 35 ] , UI-TARS [ 30 ] , and Agent-S [ 2 , 3 ] . These systems differ primarily in how agents perceive web pages and how

Read the complete text