ChatGPT HTML preview flaw allowed account takeover; fixed
2026-11-01 · Simon Willison
Simon Willison summarized research published by Parameter Labs. They found a complex attack chain in ChatGPT's HTML previews (formerly Canvas), which show interactive HTML apps in a sandboxed iframe that should not touch OpenAI APIs or private data.
The chain starts with the MathLive library used for graphing, which includes a virtual keyboard that a sandboxed iframe can trigger in the parent via postMessage. The receiving code uses innerHTML, so any frame that can send a message can add HTML to the parent, and nothing stopped other sandboxed frames from calling it.
That lets an attacker inject a new iframe without sandbox restrictions. OpenAI's CSP blocks inline scripts and allows scripts from only a few domains, including YouTube, whose oEmbed endpoint can reflect JavaScript so it executes. With JavaScript running on ChatGPT, the attacker can fetch private data from APIs and exfiltrate it through an image request.
The result: a ChatGPT share URL that, when visited by another signed-in user, could exfiltrate private data or act on their behalf. Per the post, OpenAI closed the hole and paid a $5,000 bounty, which Willison thinks was a bit cheap. No in-the-wild abuse is mentioned. Users need no action, but should still be wary of unknown share links.