How We Took Over ChatGPT Accounts
A demonstrated exploit chain shows sandboxed AI-generated HTML previews can leak private user data, a lesson for anyone building LLM apps that render untrusted code.
Researchers at Parameter Labs found a way to take over ChatGPT accounts. ChatGPT shows user-generated apps inside a locked-down box (a 'sandbox') for safety, but they found a chain of tricks that let malicious code inside that box escape and run on the main page. The result: a shared ChatGPT link could steal a signed-in user's private data. OpenAI fixed it and paid a $5,000 bounty.
Parameter Labs found a working attack against ChatGPT: a crafted share URL could exfiltrate private user data or act on a victim's behalf when another signed-in user opened it. The root cause was unsafe sandboxing of ChatGPT's interactive HTML previews. OpenAI closed the hole and paid a $5,000 bug bounty, which Willison called cheap for a vulnerability this serious. Any company rendering AI-generated code for users faces similar sandboxing risk.
The attack chain: ChatGPT's HTML previews run in sandboxed iframes; OpenAI's graphing uses the MathLive library, whose virtual keyboard accepts postMessage() calls and renders them via innerHTML, letting any sandboxed frame inject unsandboxed HTML. Content Security Policy blocked inline scripts and allowed script loads only from a few domains, including YouTube, whose oEmbed endpoint reflected executable JavaScript. That enabled API data exfiltration via image references. OpenAI patched it and paid $5,000.