Parameter Labs discloses ChatGPT account takeover exploit chain
Parameter Labs published an exploit chain targeting the sandboxed iframe used by ChatGPT's HTML preview (formerly Canvas). An attacker could use postMessage() from the sandboxed iframe to trigger message-handling code for the MathLive virtual keyboard in the parent page; that code writes content with innerHTML and does not validate the message origin, allowing injection of a new iframe without sandbox restrictions. The chain then uses the YouTube domain allowed by OpenAI's CSP to execute JavaScript via reflection at the YouTube oEmbed endpoint, running script in the ChatGPT page context, calling APIs to read users' private data and exfiltrating it through image references. The result: when another logged-in user opens a shared ChatGPT link, their private data can be stolen or actions performed on their behalf. OpenAI has fixed the vulnerability and paid a $5,000 bounty; this is a unilateral disclosure by the researchers, not an independently reproduced measurement result.
ChatGPT's HTML preview (previously called Canvas) runs user-generated interactive HTML applications in a sandboxed iframe, in order to prevent untrusted code from calling the OpenAI API or reading users' private data. Parameter Labs' disclosure says OpenAI introduced the MathLive library in the charts feature, and that library's virtual keyboard can be triggered by the parent page through postMessage; this cross-frame communication path is the starting point of the sandbox escape chain.
For developers building sandboxed web applications or AI products, this case shows that relying on the iframe sandbox alone is not enough: the parent page must validate the origin when receiving postMessage, avoid inserting untrusted content with innerHTML, and review third-party endpoints in the CSP allowlist that can reflect scripts. For ChatGPT users, clicking HTML preview links shared by others before the fix carried the risk of account data being stolen; OpenAI says it has closed the vulnerability.