Skip to content
XSS Write-up Advanced

One link, all your private chats: how AI assistants get turned against you

A shared ChatGPT link could run attacker code in the victim's logged-in session and read private chats. The attack bypassed the Preview sandbox by abusing a third-party library's unchecked message listener and a content security policy that allowed scripts from YouTube.

Devansh Patel Follow

Published on osintteam.blog

In October 2026, a single ChatGPT share link was enough to take over the account of anyone who opened it. Researchers at the security firm Parameter found the flaw and reported it to OpenAI’s bug bounty program on October 18.

Devansh Patel, on osintteam.blog

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely an unchecked postMessage listener in a third-party library (MathLive) that accepted HTML from any frame, combined with a content security policy that allowed scripts from YouTube, enabling the creation of an unsandboxed frame on the main origin.

Impact

An attacker could read private chats and take any action the victim's account could take, though the researchers tested only between their own accounts and reported no use against real users.

What the attacker needed

Victim opens a shared ChatGPT link; victim clicks Preview (or auto-preview); attacker can send a link to the victim

The fix

OpenAI fixed the bug by rejecting the messages the attack depended on, and the fix was in place on both web frontends by October 26.

How it was found

  1. The attacker sends a shared ChatGPT link containing an interactive graph.
  2. The victim opens the link and clicks Preview (or Preview opens automatically).
  3. The graph loads MathLive, which sets up a message listener that does not check the sender.
  4. The sandboxed Preview sends a message with raw HTML as layout data, which the main page accepts.
  5. The HTML creates an unsandboxed frame on chatgpt.com, and a script from YouTube is loaded to run attacker code.
  6. The code calls ChatGPT's APIs as the victim to read and exfiltrate private chats.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A shared ChatGPT link could contain hidden code that runs in your ChatGPT account when you open it. The code could read your private chats and send them to an attacker. The problem was fixed by OpenAI.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Devansh Patel

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.