Skip to content
XSS Write-up Advanced

ChatGPT Lockdown Mode Bypass: Phishing, Malware Delivery, and Silent Data Exfiltration

ChatGPT's HTML preview sandbox allowed popups to escape the sandbox because the iframe had the allow-popups and allow-popups-to-escape-sandbox tokens, and a nested iframe's contentWindow.open bypassed the redefined window.open. An attacker could silently exfiltrate chat history, show phishing popups, and deliver malware, even with Lockdown Mode enabled.

stcpresearch Follow

Published on research.checkpoint.com

Earlier this year, Check Point Research disclosed a security flaw in ChatGPT’s code-execution runtime that allowed sensitive conversation data to be silently exfiltrated to an attacker-controlled server through DNS tunneling, a hidden outbound channel that bypassed the runtime’s network isolation. A fix for this issue…

stcpresearch, on research.checkpoint.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The sandbox iframe was configured with allow-popups and allow-popups-to-escape-sandbox, and the JavaScript override of window.open could be bypassed by using a nested iframe's contentWindow.open.

Impact

An attacker could silently exfiltrate entire chat history and uploaded files, display phishing popups, and deliver malware, even with Lockdown Mode enabled; in the browser, automatic downloads were not blocked, while ChatGPT Classic required an extra click for file downloads.

What the attacker needed

Victim opens a malicious prompt, GPT, or shared chat; Lockdown Mode may be enabled; ChatGPT Classic needs no user interaction; Browser needs a click to open the popup

The fix

OpenAI removed the allow-popups and allow-popups-to-escape-sandbox permissions from the outer HTML-preview sandbox iframe, and retesting confirmed the technique no longer works.

How it was found

  1. Create an HTML preview containing a nested iframe.
  2. Call the nested iframe's contentWindow.open to open a popup, bypassing the redefined window.open.
  3. Use the escaped popup to load attacker content or send data to an external server.
  4. In ChatGPT Classic, trigger this without a user gesture to exfiltrate chat data silently.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

ChatGPT can show a preview of HTML code inside a locked-down box so it cannot reach the internet or the rest of the app. The box still allowed new browser windows to be opened, and a trick using a page inside a page got around the block on opening windows. That let a malicious chat message quietly send private chat data to an attacker or show fake login windows.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by stcpresearch

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.