Top story of 22 on Sunday, November 1
Exploit chain let attackers take over ChatGPT accounts via HTML previews
Parameter Labs disclosed an exploit chain against ChatGPT's HTML previews (the successor to Canvas). Code in a sandboxed iframe could postMessage the MathLive virtual keyboard in the parent page, which used innerHTML, to inject an unsandboxed iframe, then get…
Top story of 22 on Sunday, November 1
Why it matters
Anyone rendering model-generated HTML in iframes should audit their postMessage listeners and CSP allowlists, because one third-party library broke the whole sandbox.
What happened
1 min readParameter Labs disclosed an exploit chain against ChatGPT's HTML previews (the successor to Canvas). Code in a sandboxed iframe could postMessage the MathLive virtual keyboard in the parent page, which used innerHTML, to inject an unsandboxed iframe, then get script execution by abusing a YouTube oEmbed endpoint allowed by OpenAI's CSP. A crafted share link could exfiltrate a signed-in victim's private data or act on their behalf; OpenAI fixed it and paid a $5,000 bounty.
Our analysis
The lesson is that an iframe sandbox is only as strong as every message handler in the parent page: one library accepting postMessage from any frame and writing innerHTML undid it. Allowlisting big domains like YouTube in CSP is also risky because of reflective endpoints such as JSONP or oEmbed. The artifacts pattern is now common across Claude, Gemini and open-source chat UIs, so this applies well beyond OpenAI; serving untrusted HTML from a separate origin is the sturdier design. The issue is already fixed, so users need do nothing, and the $5,000 bounty looks low for one-click account takeover.