Critical ChatGPT Vulnerability Allowed Attackers to Hijack Sessions and Read Private Chats via Shared Links

A newly disclosed security vulnerability in ChatGPT could have allowed malicious actors to execute arbitrary code within the active, logged-in browser sessions of unsuspecting users simply by enticing them to open a shared conversation link. Discovered by researchers at the cybersecurity firm Parameter, the high-severity flaw exposed users to severe privacy breaches, including the potential theft of sensitive personal or professional data stored within private chat histories that were never intended to be shared.

The security researchers formally reported the vulnerability to OpenAI on October 18 through the company’s official bug bounty program hosted on Bugcrowd. Recognizing the severity of the threat, OpenAI moved quickly to deploy patches across its web frontends, fully remediating the issue within eight days. OpenAI ultimately classified the vulnerability as a P1, designating it within its most critical severity category, and subsequently awarded the researchers $5,000 for their discovery. Parameter publicly disclosed the technical details of the flaw on October 28 after confirming that the fixes had been successfully deployed.

The attack vector capitalized on a routine and widely used feature of the artificial intelligence platform: the ability to share a ChatGPT conversation publicly via a unique web link. Under normal circumstances, users share these links for collaboration, troubleshooting, or sharing interesting model outputs. These links can be distributed across virtually any digital medium, including email messages, direct chat applications, corporate support tickets, or public social media posts.

A Shared ChatGPT Link Could Run Attacker Code in Your Session and Read Private Chats

What made this particular vulnerability uniquely dangerous was the complete absence of traditional prerequisites required for many cyberattacks. The victim did not need to install specialized software, join an unauthorized workspace, or authenticate credentials through a malicious third-party login portal. In the initial and most reliable iteration of the attack sequence developed by Parameter, a victim merely needed to open the shared link and click ChatGPT’s on-screen Preview button a single time. In a subsequent, more streamlined variation of the exploit, the researchers configured the target page to automatically trigger the Preview function upon loading, meaning that simply opening the malicious link was sufficient to execute the attack chain entirely without user interaction.

What the Attacker Could Do

Once the malicious link was rendered in the browser, the attacker-controlled code executed directly within the victim’s authenticated ChatGPT session, operating with the exact same permissions and access privileges as the legitimate web application. Rather than scraping visual data directly from the user’s viewport, the injected script bypassed the user interface entirely, communicating directly with ChatGPT’s own signed-in application programming interfaces.

This direct API access granted the running code extensive reach across the victim’s account. During their controlled testing, the Parameter researchers demonstrated that the exploit script could successfully enumerate a list of the victim’s recent conversations, programmatically open private chat threads that had never been shared with external parties, and extract portions of those confidential discussions, transmitting the harvested data back to a remote server controlled by the researchers.

Because the injected code operated with the full web access of an authenticated session, its capabilities were not strictly confined to retrieving chat logs. The researchers noted that an adversary could theoretically have performed virtually any action on behalf of the victim within their ChatGPT account. It is important to emphasize that this research was conducted entirely within a controlled laboratory environment. Parameter has confirmed that there is no evidence of the vulnerability being exploited in the wild against real-world users, and all testing of the private-chat extraction capability was performed safely between isolated test accounts.

A Shared ChatGPT Link Could Run Attacker Code in Your Session and Read Private Chats

How the Link Broke Out of Its Sandbox

The mechanics of the exploit involved a sophisticated chaining of multiple architectural features within the ChatGPT web interface. The core mechanism began with a feature that allows ChatGPT to transform specific blocks of HTML code generated during a conversation into an interactive web page via a dedicated Preview pane. Because these generated pages can contain arbitrary code, OpenAI designed the feature to operate inside a heavily restricted, locked-down iframe hosted on a separate web domain. This sandbox is intended to isolate the previewed content, preventing it from reading, modifying, or interacting with the primary ChatGPT application frame surrounding it.

While this primary security boundary successfully held, the researchers discovered that a secondary feature operating within the same shared conversation provided a pathway across the security barrier. The shared chat contained an interactive mathematical graph component. Rendering this graph required loading an external math rendering library known as MathLive directly into the main ChatGPT web page.

The integration of MathLive left an active event listener running within the main application context, which was designed to accept incoming messages concerning the state of the on-screen virtual keyboard. In web security, communication between different browser frames or origins must strictly validate the origin and intent of incoming messages to prevent unauthorized cross-frame tampering. Parameter discovered that the MathLive event listener failed to properly validate the sender of incoming messages, accepting keyboard-related communications from any source. Furthermore, the message handler improperly permitted raw HTML payloads to be transmitted.

This oversight allowed the isolated Preview frame to reach across the structural boundary and inject arbitrary attacker-controlled HTML directly into the trusted main application page. Once the malicious HTML was accepted into the primary context, it constructed a new browser frame that the browser’s Same-Origin Policy treated as a legitimate part of the primary chatgpt.com domain. To supply the malicious payload, a script was loaded from YouTube, bypassing standard content security restrictions. ChatGPT’s strict content security policy successfully blocked inline script execution, but it permitted scripts loaded from trusted external domains such as YouTube, providing the final mechanism needed to execute the attacker’s code inside the trusted session.

A Shared ChatGPT Link Could Run Attacker Code in Your Session and Read Private Chats

What OpenAI Fixed, and What Users Should Do

Following the disclosure by Parameter, security engineers at OpenAI successfully replicated both the arbitrary code execution vector and the private-chat data exfiltration proof of concept. The security team escalated the internal severity rating from P2 to P1 and rapidly developed patches deployed across two distinct versions of the ChatGPT web frontend. By October 26, both frontend architectures had been updated to strictly reject the malformed cross-frame messages that underpinned the attack vector.

The underlying architectural vulnerability stemmed from a combination of design decisions within the web interface, notably the interaction between third-party component libraries and insufficiently validated inter-frame messaging listeners. Security analysts noted that while the inclusion of the YouTube script served as the final workaround for executing the payload, simply blocking external script sources would not have fully resolved the core issue. A truly robust defense required addressing the root cause: ensuring that untrusted frames, such as the interactive Previews, are completely restricted from pushing raw HTML or unvalidated messages into the primary application context.

For everyday users of ChatGPT, no manual intervention, software installation, or credential reset is required. Because the security flaw resided entirely within OpenAI’s web application architecture, the patches were deployed centrally on the server and frontend sides. Users can continue to utilize the platform’s shared link features securely, knowing that the specific message-validation bypass discovered by Parameter has been permanently neutralized.