Skip to content
Disclosed report Advanced CVE-2025-6427

closed windows and removed iframes can be used to bypass an inherited connect-src CSP and hide network activity from the DevTools

A page with a connect-src CSP set to none could still send network requests by making them from the detached window of a removed iframe. The requests also did not appear in the DevTools Network tab, letting an attacker hide traffic from someone debugging the page.

lebr0nli Follow

Originally disclosed on Mozilla

  • Fixed in 11 days
  • Paid in 12 days
  • Disclosed after 11 days
Text
Created attachment 9488327
poc.html

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0

Summary:

By using `fetch`, `navigator.sendBeacon`, `EventSource`, and `WebSocket` from the detached window of a removed iframe, the attacker can bypass the connect-src CSP, also the network activity initiated by these functions will not be shown in the `Network` tab of the DevTools.

Steps to reproduce:

1. Host the attached `poc.html` file on a server at `http://<hostname>/poc.html`.
2. Even though the `connect-src` directive is set to `none` at `http://<hostname>/poc.html`, after visiting, you should notice 4 request being sent to `<hostname>` (`POST /fetch`, `POST /sendBeacon`, `GET /EventSource`, and `GET /WebSocket`). In addition, if you open DevTools and reload the page, you should notice these 4 requests to `<hostname>` do not appear in the `Network` tab. This behavior can be used to hide certain attack traffic while the victim is debugging with DevTools.

Actual results:

`connect-src` is bypassed and the network activity is hidden from the DevTools.

Expected results:

`connect-src` should not be bypassed and the network activity should be visible in the DevTools.

The original report as published on Mozilla's Bugzilla, by lebr0nli. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

How it worked

Root cause

Likely the browser did not carry the parent page's connect-src policy over to the detached window of a removed iframe, and it also stopped attributing that window's requests to the page in DevTools.

Impact

An attacker could send data out despite a connect-src policy of none and keep that traffic out of the DevTools Network tab, which could hide attack traffic from someone debugging the page.

What the attacker needed

Victim visits attacker page; browser allows detached iframe windows

How it was found

  1. Host the proof-of-concept page on a server.
  2. Visit the page, which has connect-src set to none, and observe four requests still being sent.
  3. Open DevTools and reload, and observe those four requests are absent from the Network tab.

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 report has not been written yet. The Original tab links to the source.

A Content Security Policy is a rule set a website gives the browser, and connect-src limits which addresses scripts may contact. Here the rule said no connections were allowed, yet requests still went out when they were started from a window that had been detached from a removed iframe. Those requests were also missing from the browser's developer tools, so someone inspecting the page would not see them.

More by lebr0nli

View all

3 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

Same bug class and techniques, clearest first.