Skip to content

We took over ChatGPT accounts: the MathLive postMessage chain, and the 20-line audit for your own listeners

8.4 relevance
Score Breakdown
technical depth
9
novelty
9
actionability
8
community
7
strategic
7
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Detailed account takeover via ChatGPT share links with CSP bypass is technically deep, novel, and highly actionable for security.

AI/ML dev.to
We took over ChatGPT accounts: the MathLive postMessage chain, and the 20-line audit for your own listeners
Summary

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.

Author

Sam LABBE

More from Sam LABBE →