Explainer / Published 2026-10-31

A shared ChatGPT link could run code inside your session

Researchers showed that a crafted public ChatGPT share could execute JavaScript in a signed-in session and read private chats, until OpenAI fixed it on October 26.

Concept illustration of a chain link icon beside a broken shield shape on a pale background, with no people, no logos and no readable text.
Editorial illustration of a browser-sandbox boundary; it does not depict ChatGPT, OpenAI or any real interface.

THE SHORT VERSION

  • Researchers at Parameter showed that a crafted public ChatGPT share could run their JavaScript in the signed-in session of anyone who opened it.
  • The payload could list recent conversations, open a private chat the attacker never had access to, and send part of it to an external server.
  • OpenAI reproduced the issue, raised it from P2 to P1, and fixed it on October 26 across two versions of the ChatGPT web frontend.

What the researchers demonstrated

The Hacker News reported that a malicious ChatGPT share link could run an attacker's code in the logged-in session of anyone who opened it, allowing them to read private conversations. The research came from Parameter, a security firm, and the trap was an ordinary conversation shared through ChatGPT's normal public-link feature.

Parameter's own write-up describes the test: the payload could enumerate the victim's conversation list, retrieve content from a private conversation that had never been shared with the attacker, and send data from that conversation to an external server. The victim did not have to install an app, join a project, paste code or open developer tools.

How the chain crossed the sandbox

ChatGPT can turn an HTML block into a small working page through its Preview feature. Because that page can contain arbitrary code, it runs in a restricted frame on a separate web address, where it cannot read the main ChatGPT page around it. The question Parameter started from was simple: if Preview code is boxed into a different site, what can it still talk to?

The answer was a message listener. The shared conversation contained an interactive graph that loaded MathLive, a maths library, into the main page. Loading it also installed a listener for messages about MathLive's on-screen keyboard, and that listener accepted messages from any sender and allowed the keyboard layout to contain raw HTML. The Preview could then send HTML across the boundary into the trusted page.

From HTML to code execution

The HTML built a new frame that the browser treated as part of chatgpt.com, and a script loaded from YouTube supplied the code that ran inside it. The researchers noted that ChatGPT's content security policy blocked inline code but allowed scripts from YouTube, which is why that step worked.

They also emphasised that the YouTube step was a workaround rather than the cause. Blocking it alone would still leave an untrusted Preview able to push HTML into the main site. The underlying problem was two unrelated features, the graph library and the sandbox, combining into a path that neither was designed to create.

What the payload could do

The code called ChatGPT's own signed-in APIs directly rather than reading what happened to be on the screen. Parameter said that because it ran with the victim's full web access, its reach was not limited to the chats they demonstrated. The write-up puts it plainly: essentially, they could perform any action on behalf of the victim's ChatGPT account.

The demonstration was a controlled test. Parameter said it does not report any real-world use of the flaw and ran the private-chat proof between separate accounts rather than against real users. That distinction matters for readers: a demonstrated capability is not the same as evidence of exploitation.

What OpenAI changed

According to Parameter, OpenAI reproduced both the code execution and the private-conversation proof, raised the severity from P2 to P1, and rolled a fix across two versions of ChatGPT's web frontend. By October 26, both versions rejected the messages the attack relied on. The firm said it submitted the report to OpenAI's bug bounty programme.

The fix addresses the message path rather than the individual payload, which is the right level: the listener no longer accepts messages from unapproved senders, so the Preview can no longer hand HTML to the trusted page. That closes the chain the researchers used, though the lesson about cross-feature interactions applies to any product that combines user-rendered content with a sandbox.

The disclosure timeline

The write-up gives dates for each step, which is useful for judging how the response went. Parameter found the issue in October, reproduced the chain through the normal interface on October 14, upgraded the fixed alert to arbitrary JavaScript the same day, and submitted the report to OpenAI's bug bounty programme on October 18. OpenAI fixed it on October 26 and classified it as P1.

That is eight days from report to fix, and the severity change, from P2 to P1, is the part worth noticing: it means the initial triage underrated what the researchers had shown. The firm also said the fix was rolled out across two frontend versions, with one version needing an update during the rollout, which is the ordinary messiness of shipping a security fix to a live product.

What is established, and what is not

Established: a crafted public ChatGPT share could execute JavaScript in a signed-in session and read private conversations; the chain relied on a MathLive message listener and a Preview frame; OpenAI reproduced it, raised the severity to P1 and fixed it by October 26; the demonstration was a controlled test with no reported real-world exploitation. Not established: whether the issue was ever exploited before the fix, whether other cross-frame listeners remain, and what the bounty payment was.

For readers, the useful takeaway is that link-preview features are part of the attack surface of AI products, not decoration. This site has covered a hardware flaw that produced dangerous answers, a trojanised Claude Code extension and the controls Anthropic proposes for high-risk models; all three describe the same pattern, where a convenience feature becomes the way in.

Sources & reporting limits

  1. A Shared ChatGPT Link Could Run Attacker Code in Your Session and Read Private Chats
  2. We found a gap at OpenAI
Keep the thread.

Follow Industry to find related stories on your next visit.

THE WEEKLY EDIT

The week, made clear.

Stories worth understanding, brought together in one weekly edition.

Share this page

Instagram, TikTok & other apps

Copy the page link, then paste it where your chosen app supports links. You choose whether to send or publish.