We took over ChatGPT accounts: the MathLive postMessage chain, and the 20-line audit for your own listeners
A chain of four unvalidated postMessage listeners in MathLive, the math-input library loaded by ChatGPT for interactive graphs, enabled full account takeover when a victim opened a shared conversation link. The exploit bypassed CSP via a YouTube JSONP endpoint and used an unsandboxed srcdoc iframe to inherit chatgpt.com's origin, allowing session token theft and conversation exfiltration in ~4.5 seconds. A 20-line static audit pattern (checking for missing event.origin/event.source checks) can flag similar vulnerabilities in any JavaScript bundle.