A signed-in ChatGPT user opens a share link sent by someone else and sees what appears to be an ordinary HTML preview. Before the vulnerability was patched, however, malicious code in the preview could cross the sandbox boundary, read the user’s private data, and perform account actions on their behalf. The key issue is not that the link directly “steals” a password, but that several components that should have remained separately confined were chained into an attack path.

Imagine an office building where visitors may only leave messages at the front desk. A message is passed into the back office, where it is written into a new window, and that window then borrows the authority of an approved contractor to act. Each step may not look like an intrusion on its own, but together they allow a visitor to reach floors they were never supposed to enter.

Same Link, Different Worlds When Signed In and Signed Out

The attack begins with a ChatGPT share URL (Uniform Resource Locator, a web address pointing to a specific page) that opens normally. If a victim visits it while signed in, an account-level attack may be triggered.

Three Steps from a Malicious Link to an Account
The attacker creates a ChatGPT share URL containing malicious content
→
The victim opens the link while signed in
→
The attack chain embedded in the page is triggered
→
Private data is exposed, or the account is operated on the victim’s behalf

The link relies on a native ChatGPT feature. What was previously called the artifacts mode is now known as HTML preview, a feature that displays interactive custom web applications and can place a custom HTML app directly inside a conversation. Users do not have to leave the ChatGPT page to interact with charts, buttons, or other components.

Although such apps appear to coexist with the ChatGPT page, they actually run inside a sandboxed iframe (a frame that isolates embedded web content). The sandbox is intended to prevent apps from directly accessing the ChatGPT page and its account environment. HTML preview must also rely on this isolation to host user-generated custom code.

The problem arises because the isolation boundary takes on a different context when the person sharing the content changes. An attacker can turn the relevant HTML app into a ChatGPT share URL and send it to another user. When the link is opened, the malicious app runs inside the recipient’s signed-in ChatGPT page, not the attacker’s own session.

The attack chain disclosed by Parameter Labs showed that untrusted code inside the sandbox could use the ChatGPT page itself to gain script execution capabilities. Once execution was available, private user data could be retrieved through relevant APIs (service interfaces through which programs exchange data with web pages), resulting in data exposure or actions taken on the user’s behalf.

So the focus should not be on whether the link text resembles official content or whether the file extension looks right. What actually changes the consequences is the opener’s current sign-in state: the same share link opened by a signed-out visitor and by a signed-in user provides the attack with access to very different environments.

How Does Sandboxed Code Escape Isolation?

Sandboxed code was originally confined to its own frame, but ChatGPT’s graphing feature left it a channel through which it could reach the parent page: the virtual keyboard.

OpenAI uses the MathLive JavaScript library to provide graphing support. The library includes a virtual keyboard that an iframe in the sandbox can use to send messages through postMessage(a browser method for passing messages between windows), causing the parent page to display the keyboard. The keyboard itself is not the problem; the issue is how the parent page handles the content after receiving the message.

The receiving code uses innerHTML(inserting a string into a page as web markup). This path was originally intended for MathLive, but it does not verify that the message really comes from the calling context required by the library, nor does it restrict the caller to the only trusted parent-page component.

Consequently, any iframe capable of sending this message can submit custom HTML. There is also no mechanism preventing other sandboxed frames, including the HTML preview frame, from invoking the same method. In other words, isolated frames shared an entry point that could write into the parent page, and that entry point did not distinguish which callers were authorized to use it.

Sandboxed code therefore gained a foothold for prying open the parent page from within. It could not directly execute an existing script element(a script tag on a web page) through innerHTML(inserting a string into a page as web markup), but it could inject a new iframe and bypass the original sandbox restrictions.

This step completed the escape from the original isolated environment: code confined to the sandbox used a virtual keyboard message to enter the parent page, then used innerHTML(inserting a string into a page as web markup) to insert a new iframe. How the HTML in that new iframe becomes executable script is the next part of the chain to unpack.

How Does HTML Run as Script Inside a ChatGPT Page?

The injected HTML does not execute scripts directly. Instead, the attacker exploited ChatGPT’s rule allowing it to load YouTube scripts, causing JavaScript to be reflected back into the page through YouTube’s oEmbed endpoint.

From Injection to Page Execution
Inject HTML to create a new iframe without sandbox restrictions
→
Use the iframe to load a script from an approved source
→
Reflect JavaScript through YouTube’s oEmbed endpoint
→
The script executes inside the ChatGPT page

The CSP(security rules that restrict the sources and execution of page code) set by OpenAI completely blocks inline scripts, so JavaScript written directly into the HTML cannot run. Browsers also do not directly execute script elements inserted through innerHTML. The injection point described above only inserts a new iframe; it cannot execute code on the spot.

The question is where the attacker can load scripts from. The CSP permits the page to load scripts from only a small number of approved domains, and YouTube is on that list. The attacker therefore points the iframe’s script source at YouTube, exploiting the fact that loading from YouTube is permitted; this does not mean YouTube actively participated in the attack.

The script request is then sent to YouTube’s oEmbed endpoint. This endpoint returns embed information for YouTube videos to callers, and the attacker exploited its reflection behavior for JavaScript to send the request content back to the ChatGPT page as script. The source domain has already passed the CSP check, so the browser accepts and executes the code.

What Can the Script Do to the Account?

Once the malicious code enters the ChatGPT page, it is no longer facing a signed-out bystander but a signed-in user. The browser sends page requests together with the user’s credentials, allowing the script to call APIs directly and retrieve private data.

The key is not that the script “cracks” the account; it borrows the login identity already attached to the current page. Private user data returned by the API enters attacker-controlled code, so the attacker neither needs to see the user’s password nor obtain session information again.

How is the data sent out? The script can also use image-based data exfiltration(embedding data in an image URL and sending it out). The browser loads the image, and the request URL or accompanying information becomes the outbound data channel. The page may appear to be merely displaying an image, but the image request has already carried the data out for the attacker.

The same attack chain can also use the account’s existing permissions to take actions on the user’s behalf. In other words, the final consequences are not limited to “chat history being viewed” or “profile information being copied”; the malicious code can enter account-related workflows, making requests from the user appear to be their own actions.

Is Closing One Entry Point Enough?

OpenAI has closed the vulnerability, and the attack entry point is no longer usable. The question now is whether the patch covers the entire attack chain, rather than whether a particular link can still be opened.

Simon Willison argues that the 5000 dollar bounty was too low. If a signed-in user visits a malicious share link, the attack chain may run inside the ChatGPT page, read private data, and act on the user’s behalf. The risk does not come from the shared content itself leaking information; it arises because, once the page is opened, the malicious code gains the ability to act within the account context.

After the known entry point is blocked, the chain’s three layers of restrictions still need to be checked one by one: whether a sandboxed iframe (an embedded frame that isolates an external page) can trigger cross-window messages to the parent page, whether the receiving code can inject incoming content as HTML, and whether the Content Security Policy (CSP) allows scripts only from trusted sources. Closing one entry point does not prove that the remaining stages have been tightened.

HTML preview’s security boundary must be maintained jointly by the messaging channel, HTML injection, and script sources. Patching a single iframe entry point does not eliminate the risk of account takeover. OpenAI has not disclosed whether the post-patch isolation mechanism covers similar paths that might bypass the HTML preview sandbox.

The source is Simon Willison’s blog post relaying Parameter Labs’ vulnerability disclosure; the exploit chain, patch status, and 5000 dollar bounty in this article follow that disclosure.