SafetyRisk, alignment & guardrails
ChatGPT share-link flaw let attackers take over accounts through a MathLive and YouTube exploit chain; OpenAI fixed it October 26
Parameter Labs showed that simply opening a public ChatGPT share link could run attacker JavaScript as chatgpt.com, exposing private conversations. The chain combined an unchecked MathLive message listener, an unsandboxed iframe and a YouTube JSONP endpoint; OpenAI fixed it October 26.
From the Simon Willison article of October 31, 2026 and cited sources: The victim only had to be signed in and open an attacker's published share link. [2]
SOURCES[2] Do the Math: How We Took Over ChatGPT Accounts – Parameter parameter.ai
AI-assisted, not human-edited. Methodology Corrections Who owns this site
- What happened
- The victim only had to be signed in and open an attacker's published share link. [2]
- Original source
- Simon Willison article, independent perspective
- Brief by
- AT Pulse research desk AI-assisted; publisher and contact on the desk page
- When
- October 31, 2026 article published
- Covered
- Nov 2 edition
- Evidence
- 5 sources across 5 sites
- 1How We Took Over ChatGPT Accounts – Simon Willisonsimonwillison.net
- 2Do the Math: How We Took Over ChatGPT Accounts – Parameterparameter.ai
- 3ChatGPT Shared-Link Account Takeover via MathLive Sandbox…blog.ostorlab.co
- 4Hacker News discussionnews.ycombinator.com
- 5OpenAI now pays researchers $100,000 for critical…bleepingcomputer.com
Reach: not measured yet
The victim only had to be signed in and open an attacker's published share link. No paste, install or extra click was needed. The payload could list recent chats, fetch unshared ones and call any frontend API as the victim. [2]
The exploit combined familiar web flaws, not a model failure. A MathLive message listener accepted messages without checking where they came from. A wrapper labeled HTML as safe without cleaning it, and that HTML went straight into the page. The injected HTML created an iframe with no sandbox, which therefore ran with chatgpt.com's origin. Finally, the YouTube scripts that ChatGPT's content security policy allowed included an endpoint that echoed back attacker code, so the policy did not block it. [2] [4]
Lessons for practitioners: check both the sender's origin and window in every message handler, never pass raw HTML between windows, keep generated documents sandboxed, and treat CSP as a backup layer. Teams that embed MathLive should audit their own integrations rather than count on an upgrade to fix this. [2] [3] [1]
one third-party library on the host page broke through ChatGPT's sandboxed HTML previews. Implication: any AI app that renders user-generated previews or share pages takes on risk from every script and allowlisted domain it trusts.
Executive brief
Opening a public ChatGPT share link was enough to let an attacker run JavaScript as chatgpt.com, read the victim's private conversations, and act on their behalf. The victim didn't have to paste code, install an App or click anything else. Parameter Labs found the hole by chaining a math-keyboard library, an iframe without a sandbox, and a YouTube endpoint that ChatGPT's security policy trusted. OpenAI rated the bug P1, fixed it on October 26, 2026, and paid $5,000. Commentators widely called that payout too low. The writeup reports no exploitation in the wild, and no outside researcher has publicly reproduced the chain.
What changed and event timeline
Exploit chain built
Parameter confirmed the MathLive message-to-HTML path against production. It then got arbitrary JavaScript running and checked that delivery through a public share worked across separate accounts ().
Reported to OpenAI
The report went through OpenAI's bug bounty program. On October 19 Parameter added proof that private conversations could be exposed ().
Escalated and partly mitigated
OpenAI reproduced the bug and raised it from P2 to P1. One web frontend was fixed on October 22, and CSP changes on October 23 blocked part of the chain ().
Resolved
Both frontends now reject the cross-frame MathLive messages. OpenAI paid $5,000 ().
Disclosure and commentary
Mukul Goyal published the writeup on October 28. Simon Willison and Ostorlab covered it on October 31 (;).
Capabilities and access
- Affected surface: ChatGPT's web app, specifically conversations that contain an interactive graph (which loads MathLive) and an HTML Preview, the sandboxed custom-HTML feature formerly called Canvas (OpenAI Help; Willison).
- What the attacker needed: the ability to create and publish a share.
- What the attacker gained: the payload could list recent conversations, fetch unshared ones, and call any frontend API as the victim (Parameter).
Read the full section
- Affected surface: ChatGPT's web app, specifically conversations that contain an interactive graph (which loads MathLive) and an HTML Preview, the sandboxed custom-HTML feature formerly called Canvas (OpenAI Help; Willison).
- What the attacker needed: the ability to create and publish a share. The victim only had to be signed in and open the
/share/<id>link. - What the attacker gained: the payload could list recent conversations, fetch unshared ones, and call any frontend API as the victim (Parameter).
- No AI model was involved. This was a flaw in the product's web code, not in the model.
Technical analysis for researchers and developers
The chain had five links (Parameter): Data left through a plain image request. Parameter published a proof-of-concept payload outline but no public reproduction harness.
Read the full section
The chain had five links (Parameter):
- Graph component. The graph loaded MathLive, which installed a
postMessagelistener on the top-level page. That listener checked neitherevent.originnorevent.source. - HTML in settings. A
mathlive#virtual-keyboard-message/update-settingmessage could carry raw HTML in itslayoutsfield. - Fake sanitizer. MathLive's
createHTML()wrapper marked strings as trusted without cleaning them, and the result went intoinnerHTML. - Iframe escape. The injected HTML created an
<iframe srcdoc>with no sandbox attribute. Because the main page created it, the frame inherited thehttps://chatgpt.comorigin. - CSP bypass. ChatGPT's CSP allowed scripts from YouTube. YouTube's oEmbed JSONP
callbackparameter echoed attacker code back before validation, so the code ran.
Data left through a plain image request. Parameter published a proof-of-concept payload outline but no public reproduction harness.
Claims and evidence
- Attack chain, timeline, P1 rating, $5,000 payout: all come from the researcher's own writeup (Parameter). OpenAI has published no statement or advisory.
- Ostorlab says it summarized Parameter's research rather than reproducing it (Ostorlab). Willison's post is commentary on the writeup (Willison).
- No exploitation in the wild: this rests on Parameter's account, as relayed by Ostorlab, that the bug was only shown in controlled testing (Ostorlab).
Read the full section
- Attack chain, timeline, P1 rating, $5,000 payout: all come from the researcher's own writeup (Parameter). OpenAI has published no statement or advisory.
- Independent corroboration: none available. Ostorlab says it summarized Parameter's research rather than reproducing it (Ostorlab). Willison's post is commentary on the writeup (Willison).
- No exploitation in the wild: this rests on Parameter's account, as relayed by Ostorlab, that the bug was only shown in controlled testing (Ostorlab).
Context and prior work
- The exploit uses familiar web-security mistakes: unchecked
postMessagelisteners,innerHTMLsinks, and JSONP endpoints on CSP-allowlisted domains. - Willison frames it as a failure of the "artifacts" pattern.
- In March 2025 OpenAI raised its top bounty for "exceptional and differentiated" critical findings from $20,000 to $100,000 (BleepingComputer).
Read the full section
- The exploit uses familiar web-security mistakes: unchecked
postMessagelisteners,innerHTMLsinks, and JSONP endpoints on CSP-allowlisted domains. Hacker News commenters made the same point (HN). - Willison frames it as a failure of the "artifacts" pattern. In that pattern, untrusted HTML in a sandboxed frame must never be able to reach the host page's APIs (Willison).
- In March 2025 OpenAI raised its top bounty for "exceptional and differentiated" critical findings from $20,000 to $100,000 (BleepingComputer).
Limitations, safety and contested findings
Read the full section
- Bounty size is contested. Willison called $5,000 "a bit cheap" for a bug this serious (Willison). Hacker News commenters argued that low payouts push researchers toward exploit markets, while others defended disclosing ethically anyway (HN).
- MathLive's upstream status is unclear. The writeup names no fixed MathLive release, and Ostorlab notes that npm and GitHub disagree on which version is the latest (Ostorlab).
- Writeup clarity. Some HN commenters said the post read as AI-generated and made the chain harder to follow (HN).
Business and practitioner implications
Read the full section
- Audit MathLive integrations directly. Teams embedding MathLive shouldn't assume an upgrade fixes this; Ostorlab advises checking your own integration (Ostorlab).
- Apply Parameter's four rules (Parameter):
- check both sender origin and window on every message receiver;
- never pass raw HTML in cross-window settings;
- keep dynamically created documents sandboxed;
- treat CSP as a backup, not the main barrier.
- Review CSP allowlists. Any allowed domain with a JSONP endpoint, YouTube included, can serve attacker-controlled script.
- Treat share links as an attack surface. Products that render user-generated code previews, which most AI chat apps now do, inherit the risk from every third-party library on the host page.