arXiv:2610.22697cs.CROct 2026

Manuscript Offprint

arXiv:2610.22697

What It Is, Not What It Says: Securing Agentic Browsing Interactions with Web Semantics

Umar Iqbal

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Umar Iqbal

Washington University in St. Louis

Abstract—AI agents increasingly browse the web on users' behalf, yet they consume webpages as screenshots or text, exposing their LLMs to unvetted third-party content. Browsers enforce semantics under which what an element can do depends on what it is and where it comes from, not on what it says. Agents flatten these semantics, so injected text can persuade the LLM to exercise the user's authority for content that has none. As LLMs remain easy to persuade, the agent's interface to the web must itself ensure the integrity of what the agent reads, interprets, and does. We propose INTACT, which runs on an unmodified browser. INTACT builds GENTREE, a bespoke representation that captures provenance and web semantics. INTACT passes the page via GENTREE to the LLM one element at a time, so the LLM decides on each element without any other element's text. Its harness executes each step only within the capabilities of the step's element and asks the user before acting on third-party content. On 1,270 real webpages, GENTREE attributes 2.3×2.3\times as many elements to third parties as the browser, which misattributes 58.7% of them to the first party. On 1,091 of these webpages with injected attacks, only 12.8% of attacks get through INTACT's planner, each at most as a consent request, against 73.1% for a conventional planner. Isolation disrupts functionality on only 3.7% of tasks, and a parallel schedule could remove most of its added latency.

1. Introduction

AI agents increasingly act on users' behalf, and the web gives them an API to nearly every online service. Agentic browsers (e.g., Comet [1], Claude in Chrome [2], and Gemini in Chrome [3]) and frameworks (e.g., Browser Use [4]) read pages, click, fill forms, and navigate across sites, often within the user's authenticated sessions.

This reach carries a fundamental risk, as web content is unvetted. Pages are assembled at runtime by parties their operators neither control nor always know. Third parties appear on 92% of pages, and the median site among the top thousand includes 66 of them [5]. As third parties load further third parties, about half of websites render content they did not load themselves [6]. The web is accordingly among the largest attack surfaces in computing. Cross-site scripting has ranked among MITRE's two most dangerous software weaknesses every year since 2020, and in 2025 SQL injection joined it at the top [7].

One would thus expect agents to interface with the web through carefully designed mechanisms. Instead, they simply consume a page as a screenshot or as text derived from its markup [8], [4], exposing the underlying LLM directly to unvetted content. LLMs are known to follow instructions embedded in such content, i.e., prompt injection [9], and to fall for scams [10]. Model-level defenses reduce but do not eliminate either [11], [12], [13], and OpenAI concedes that prompt injection, “much like scams and social engineering on the web, is unlikely to ever be fully ‘solved’” [14]. Such attacks are already manifesting in practice. Hidden instructions in Reddit posts and comments have led deployed agents to leak users’ one-time login codes and credit card numbers [15], [16], crafted links have made them exfiltrate email and calendar data [17], injected page elements and pop-ups divert web agents at high rates [18], [19], and injections aimed at agents appear on live websites [20], [21].

The key issue is that web markup was designed for rendering, not for agentic interfacing. Browsers invest considerable effort in enforcing its semantics. Each element has well-defined capabilities, and origins and frames bound what code from one party can do to another [22], [23], [24]. In the browser, what content can do thus depends on what it is and where it comes from, not on what it says. Screenshots and text serializations flatten these semantics, leaving natural-language text that affords the LLM neither meaning nor control. A <p> element cannot issue a network request, yet its text can cause one by persuading the agent, which then acts as a confused deputy [25], exercising the user's authority for content that has none.

Considering the well-known limitations of LLMs, we argue that security cannot rest on the model's judgment; the interface between the web and the agent must itself ensure integrity [26], [27]. Input integrity requires knowing who created or modified each piece of content the agent reads. Processing integrity requires that no element lead the agent beyond what the element itself affords. Output integrity requires that every action, and the data flow it causes, be warranted by the user's request and permitted by the web's security boundaries. All three must hold with little loss of functionality.

In this paper, we address this problem with INTACT. Our key idea is to reuse the semantics that browsers already enforce and extend them with the provenance, capturing both in GENTREE, a per-element representation of the page through which INTACT mediates what the agent reads, in-terprets, and does. For input integrity, INTACT attributes every DOM creation and modification to the responsible script [28], [29] and taints what third parties create or modify. The browser does not make this distinction out of the box, because it attributes everything a third-party script creates in a page to the first-party context.

For processing integrity, INTACT introduces virtual isolation, which extends the browser's enforcement of markup semantics to the agent without any change to the browser's architecture. INTACT passes content to the LLM one element at a time, so an element's text never reaches the decision on another element, and each action the agent derives stays tied to the element it came from, whose properties INTACT can then enforce. The <p> above thus cannot cause a request, whatever its text says.

For output integrity, INTACT controls each action based on the provenance, capabilities, effects, and security boundaries of the elements involved. These checks depend only on the page, so INTACT can enforce them reliably. The user's intent, however, is not encoded in the page, so INTACT defers to the user for decisions that the page cannot settle, e.g., using a third-party booking widget that the task requires. INTACT thus need not recognize injected content as malicious or prevent the agent from being persuaded; it limits what a persuaded agent can do.

Our key contributions are as follows:

  1. We propose and implement GENTREE, a bespoke representation for AI agents that records the provenance and web semantics of every element. On tested webpages, GENTREE attributes 2.3×2.3\times as many elements to third parties as the browser's standard attribution, which misattributes 58.7% of them to the first party.

  2. We operationalize GENTREE in INTACT, a virtual isolation architecture that runs on an unmodified browser. INTACT passes the page to the LLM one element at a time and executes each step only within that element's capabilities under web semantics. What an element says thus cannot change what it can do.

  3. We evaluate INTACT against VANILLA, a conventional planner, on 1,091 real webpages. Only 12.8% of attacks get through INTACT's planner, each at most as a request for user consent, against 73.1% for VANILLA. INTACT disrupts functionality on 3.7% of tasks, and a parallel schedule could significantly reduce its time overhead.

  4. To foster follow-up research, we release INTACT's source code and our attack benchmark of 1,091 real webpages at https://github.com/llm-platform-security/intact.

Looking ahead, we see GENTREE as a substrate for existing agent defenses. For example, defenses based on execution isolation [30], control- and data-flow enforcement [31], [32], and permission management [33] all presuppose knowing which inputs are untrusted and what each component can do, structure that webpages do not provide explicitly and that GENTREE derives automatically.

References (52)