它是什么,而非它说什么:利用Web语义保障智能体浏览交互安全
研究论文 · 2026/10/19
AI代理越来越多地代表用户浏览网页,但它们以截图或文本形式消费网页,使LLM暴露于未经审查的第三方内容。浏览器执行的语义是元素能做什么取决于它是什么以及来自哪里,而非它说了什么。代理将这些语义扁平化,因此注入的文本可以说服LLM为没有权限的内容行使用户权限。由于LLM仍然容易被说服,代理与网络的接口必须确保代理读取、解释和所做内容的完整性。我们提出Intact,它在未经修改的浏览器上运行。Intact构建GenTree,一种捕获来源和网络语义的定制表示。Intact通过GenTree将页面逐个元素传递给LLM,因此LLM在没有任何其他元素文本的情况下对每个元素做出决定。其执行框架仅在步骤元素的能力范围内执行每个步骤,并在对第三方内容采取行动前询问用户。在1,270个真实网页上,GenTree将2.3倍的元素归因于第三方,而浏览器将其中58.7%错误归因于第一方。在这些网页中的1,091个注入攻击的网页上,只有12.8%的攻击通过Intact的规划器,每个最多作为同意请求,而传统规划器为73.1%。隔离仅破坏3.7%任务的功能,并行调度可以消除大部分增加的延迟。
该论文针对AI代理浏览网页时的安全漏洞,提出了一种基于网络语义的防御方案,显著降低了注入攻击的成功率,同时保持较低的功能影响和延迟,对构建安全的代理浏览系统具有重要参考价值。
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.3x 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.