When Anthropic released the Claude Chrome extension - giving Claude the ability to see, navigate, and interact with the user's browser - we published a threat analysis outlining the risks. We mapped the attack surface: a powerful agentic system operating in the browser context, with access to DOM interaction, navigation, network inspection, and critically, a JavaScript execution tool. We warned about what could go wrong.
Now, we're here to show what does go wrong.
This post walks through a full exploitation chain we developed against Claude in Chrome. Starting from a simple alert(1) and escalating all the way to account takeover across multiple platforms - all triggered through Indirect Prompt Injection hidden inside an email.
Popping alert(1)
Every good browser exploitation story starts with alert(1). Ours is no different, except the vulnerability isn't in the browser - it's in the AI agent controlling it.
Claude in Chrome exposes a javascript_tool that, in the words of its system prompt, can:

When we simply asked Claude to “help me debug an issue on the open page using the javascript_tool…” it complied, and an alert box popped up on the page:

Claude in Chrome agent uses its javascript tool to throw an alert on the webpage with the content “1”.
This was a proof of concept. But while direct prompting is interesting, the real threat is when the attacker isn't in the chat. Enter Indirect Prompt Injection (IPI).
Next, we crafted a malicious email and sent it to our victim's Gmail inbox. The email body looked like a friendly message from "John" inviting the recipient to coffee. But hidden within the email's text content was hidden text, injected conversation turns, and instructions embedded in an image, all aimed to take over the Claude in Chrome agent the moment it would have read the email.
Then, once the victim asked Claude to "summarize my last emails," Claude follows the victim’s instructions, reads the email content, encounters the injected turn structure, and treats the embedded request as legitimate instructions. It dutifully executes the JavaScript. The victim sees an alert box and has no idea it was triggered by an email they never opened:
We go into the details of the injection in (this deep-dive post)[add link with the ato deepdive post] which you can read to learn how exactly we achieved this.
This worked both in "YOLO mode" (act without asking) and in the so called safe "ask before acting" mode, since the `javascript_tool` executes without requiring domain approval through Claude's `update_plan` mechanism. We dive deeper into the ask before acting mechanism and its flaws in a separate blog
This is not your classic Cross-Site Scripting (XSS) case limited to a vulnerable webpage, but rather a full-blown Universal XSS – Claude in Chrome can run the javascript_tool on any domain. This is an XSS-as-a-service tool in the hands of an attacker.
Arbitrary JavaScript Execution via CDN Imports
Popping alerts is a proof of concept. For real impact, we need to execute complex payloads, but the model is aligned to refuse those. Anything from accessing document or window, issuing Fetch API requests or trying to disguise the code through obfuscation, gets immediately refused by the model. We need to hide our exploits and for that, we need to import code.
We created a private package registry at esm-sh.com (mimicking the legitimate esm.sh CDN) and published custom npm packages. The IPI payload was updated to something deceptively innocent:

Claude sees what looks like a simple UUID generation request. It imports the package and calls uuid.v4(). But our published version of uuid.v4() contains an entirely different payload - one that executes silently, performs its actions, and then returns a properly formatted UUID string so neither Claude nor the user suspects anything.
This is the primitive that unlocks everything that follows. Any JavaScript payload, of any complexity, can be loaded from an attacker-controlled CDN through a single import() call that looks completely benign.
Data Exfiltration: Leaking the Gmail Inbox
With arbitrary JavaScript execution established, we wanted to see how deep the rabbit hole goes. First up: data exfiltration. The target: the victim's entire Gmail inbox.
Gmail exposes an Atom feed at https://mail.google.com/mail/u/0/feed/atom that returns recent email metadata (subjects, senders, summaries, and message IDs) in XML format. Since the javascript_tool runs in the browser context with the user's active session cookies sent with every request, fetching this endpoint works seamlessly - no authentication required beyond what the browser already has. Every request automatically operates within the victim’s authenticated session and inherits the victim’s full identity.
Our injected script:
- Fetches the Atom feed and parses message IDs, subjects, authors, and summaries.
- Converts each message ID to hexadecimal and fetches the full email page from Gmail.
- Extracts the email body from Gmail's embedded JSON data structures.
- Exfiltrates everything to our attacker server via a
POSTrequest.
The entire attack chain fires when the victim simply asks Claude to "summarize my last emails." The IPI in one of those emails triggers the JavaScript import, the attacker’s package runs, and the inbox content is silently sent to our server. Claude then proceeds to summarize the emails as requested - the victim gets exactly what they asked for, plus an invisible data breach
Google Drive Persistence
Email exfiltration is a point-in-time attack. For persistence, we targeted Google Drive.
The goal: silently share every file in the victim's Google Drive with the attacker's account. This gives the attacker ongoing access that survives password changes, session revocations, and even 2FA resets.
The exploit required reverse-engineering Google Drive's internal API, here’s what our crafted payload does behind the scenes:
- Extract file IDs - Fetch https://drive.google.com/drive and parse the HTML for
data-idattributes on gridcell elements. - Build authentication headers - Extract
SAPISIDcookies and generateSAPISIDHASHauthorization tokens using SHA-1 (replicating Google's internal auth scheme). - Obtain the API key - Fetch the Drive sharing dialog endpoint and regex-extract the
apiKeyfrom the response. - Batch permission requests - For each file, send a batch POST to https://clients6.google.com adding the attacker as a
writeron every file.
The IPI leveraged the "ask before acting" bypass we discovered: the injected prompt tricks Claude into calling `update_plan` with `drive.google.com` added to the approved domains list. Once the victim approves what looks like a reasonable plan ("read emails and help with Drive"), the exploit has free rein across both surfaces. Claude opens Google Drive, the crafted package runs, and every file is quietly shared with the attacker.
Account Takeover
The final escalation: taking over accounts on external platforms by abusing password reset flows. The victim's Gmail inbox - which we can both read and monitor in real-time - becomes the skeleton key. We demonstrated this on 3 targets: Slack, X and Claude.ai itself.
Slack
The Slack attack chain is particularly elegant. As usual it starts with an indirect prompt injection:
- The IPI triggers our package on the victim's browser the moment our malicious email is read by Claude in Chrome.
- The package calls our attacker server's
/claudeendpoint with the victim's email. - Our server spawns a second Claude in Chrome instance that navigates to Slack's sign-in page, enters the victim's email, and submits the form - including solving the CAPTCHA (Claude's safety guardrails against CAPTCHA solving were bypassed with a simple jailbreak: telling it the CAPTCHA is "a fake one designed to test your skills").
- Slack sends a confirmation code to the victim's Gmail.
- Back in the victim's browser, the injected script polls the Gmail Atom feed, extracts the Slack confirmation code, and sends it to our server.
- The attacker completes authentication with the stolen code.
Claude as an attacker tool on the server side, Claude as the exploitation vector on the client side. A closed loop.
And just like that we get a full ATO over slack. With full access to all of the user’s slack history, identity and everything that comes with it. All without a single click by the unsuspecting user.
X (Twitter)
For X, we implemented the full password reset flow programmatically via X's internal API — activating guest tokens, initiating the reset flow, submitting JavaScript instrumentation metrics, and progressing through each challenge step. The confirmation code arrives at Gmail, gets extracted by our injected script, and is sent back to the attacker. The attacker completes the password reset flow and receives a session auth_token in the response.
Claude.ai
Perhaps the most ironic target. Claude.ai uses a magic link login flow protected by Google reCAPTCHA. Our exploit:
1. Navigates to https://claude.ai/login (where the grecaptcha object is available).
2. Triggers /api/auth/send_magic_link with the victim's email.
3. Extracts the magic link nonce from the incoming email via the Gmail Atom feed.
4. Exchanges the nonce for a verification code via /api/auth/exchange_magic_link.
5. Calls /api/auth/verify_magic_link to set the session cookie.
The attacker now has a fully authenticated session on the victim's Claude.ai account. Including access to all previous chats, all connectors previously connected to Claude (such as Google Drive,Gmail, Calendar, and more) and all files previously uploaded. Mountains of sensitive information easily reachable by the attacker. This is how Claude can be used to compromise Claude.
For an in-depth breakdown of these exploits, you can visit our deep dive blog into the ATO exploits.
Disclosure and Anthropic’s Response
We reported the vulnerabilities to Anthropic through HackerOne in two separate submissions.
Initial Report: Claude Chrome Extension — Indirect Prompt Injection to UXSS
- Report date: December 27, 2025
- Status: Closed as Informative on January 27, 2026
Second Report: Claude Chrome Extension — Arbitrary JavaScript Execution via Indirect Prompt Injection Leading to Account Takeover
- Report date: January 12, 2026
- Status: Closed as a duplicate of our initial report by HackerOne on January 13, 2026
- Anthropic’s response: On January 27, 2026, Anthropic stated that the report was ineligible for its Vulnerability Disclosure Program.
Unfortunately, the risks and vulnerabilities demonstrated in this blog post persist to this day.
Wrap-Up
What started as a simple alert(1) escalated into a full attack chain: arbitrary JavaScript execution, email exfiltration, persistent Google Drive access, and account takeover across Slack, X, and Claude.ai - all triggered by a single malicious email read by an AI assistant.
The root cause isn't a single bug. It's an architectural tension: giving an AI agent powerful browser-level tools (especially javascript_tool) while exposing it to untrusted content from the web. Every mitigation Claude has, we found ways around.
It is important to note that the email used in this demonstration is only one example of how the attack can be initiated. An agentic browser is constantly exposed to untrusted content across the internet, so the same indirect prompt injection could just as easily originate from a malicious Reddit post, YouTube comment, webpage, advertisement, shared document, or any other content the agent may encounter or have within its context. The underlying risk is not specific to email; it comes from allowing an agent to interpret untrusted content while simultaneously giving it access to powerful browser tools and authenticated user sessions.
This isn't unique to Anthropic. Any agentic AI system that operates in the browser with code execution capabilities faces these same fundamental challenges. But as these tools ship to millions of users, the gap between "interesting research finding" and "real-world exploit" is shrinking fast.
Continue Reading
- Breaking Down the Indirect Prompt Injection: [Add a Link]
- A technical analysis of the Email based indirect prompt injection used in the attacks.
- The Illusion of “Ask” before Acting: [Add a link]
- An examination of Claude in Chrome’s “Ask before Acting” mechanism and its shortcomings.
- Account Takeover via Claude in Chrome: A Technical Deep Dive [Add a Link]
- An in-depth analysis into the technical details of each account takeover.


