Your AI Agent Trusts Your Browser Extension. That Was Never a Safe Bet.
Researchers at Forever Security have demonstrated a new attack chain where a browser extension exploited an AI agent to execute arbitrary code on a desktop. By gaining script permission on claude.ai, the extension used a 'Dispatch' feature to send prompts to Claude Desktop, overriding its initial hesitation and auto-clicking approval prompts to launch Calculator.
Security researchers at Forever Security have demonstrated a novel method for a browser extension to execute arbitrary code on a user's desktop by leveraging an AI agent. The demonstration involved an extension with permission to run scripts on claude.ai, utilizing a feature called 'Dispatch' to send prompts to Claude Desktop, an AI agent residing on the host machine.
The attack successfully bypassed security measures. Claude Desktop initially showed hesitation but was "talked past" its caution by the extension. Crucially, the extension then programmatically auto-clicked every approval prompt that appeared, enabling the AI agent to run a global npm install command. The install script for this command subsequently launched Calculator, serving as the traditional proof of arbitrary code execution.
While the individual components of this attack, such as malicious browser extensions, scripts running on trusted web origins, and auto-clicking confirmation dialogs, are not new, the critical innovation lies in the destination. The extension did not escalate privileges within the browser's sandbox. Instead, it reached through a legitimate, shipped feature to an AI agent on the host system that possesses real capabilities, effectively turning the browser into a remote control for a system with shell access.
This vulnerability highlights a fundamental design flaw concerning trust boundaries. If a script on a web page can communicate with a desktop agent with the same authority as the user, then any approval prompts presented by the agent offer no real protection; they become mere decoration. This suggests the core failure is not unique to AI but stems from how the browser-to-host communication is designed, which could exist with any remote procedure call bridge.
Furthermore, the argument that the attack requires a user to first install a malicious extension is dismissed by researchers. Extension compromise is a routine occurrence, with legitimate extensions frequently being sold, hijacked, or updated into malicious versions. Permissions like "can run scripts on this site" are often granted without careful consideration, making the precondition a practical and common risk rather than a theoretical one.
A particularly understated detail from the demonstration is that the AI model initially balked at the request before the extension "argued it into compliance." This indicates that if the primary control mechanism relies on the model's refusal of sketchy requests, such a control can be negotiated with. The exact method of persuasion was not detailed, but the fact that the model's hesitation could be overcome by the extension raises concerns about the robustness of AI agent internal security mechanisms. The researchers state that the underlying design remains exploitable, and similar features such as Claude Code Remote Control or Cowork sessions may allow the same attack, though this is a hypothesis and not a demonstrated result.
Share this article
Related reading
6 stories
MAS Chief Warns Against Giving AI Agents Your Bank Login

Five Banks Bid Over S$200 Million for Tokenised MAS Bills

Alipay+ Connects to Brazil’s Pix for Cross-Border QR Payments

Meet the 10 Women Leaders Putting AI to Work in Finance and Beyond

Mastercard Tests AI Agent Payment Controls with Antom

