Skip to content
Access control Disclosed report Intermediate CVE-2026-8955

`EventSource` in Web Workers bypasses the `connect-src` CSP directive

CSP's connect-src directive is not enforced for EventSource connections created inside a Web Worker, allowing an attacker to bypass the restriction and connect to arbitrary URLs.

lebr0nli Follow

Originally disclosed on Mozilla

  • Fixed in 5 days
  • Paid in 11 days
  • Disclosed after 5 days

Created attachment 9568971 server.py

VULNERABILITY DETAILS

CSP is not properly enforced when instantiating an EventSource within a Web Worker. This allows an attacker to bypass the restrictive connect-src directive and establish connections to arbitrary URLs with EventSource.

VERSION

Firefox Version: 149.0.2 stable

The vulnerability is also present in Firefox 151.0a1 nightly

REPRODUCTION CASE

Steps to reproduce

  1. Run the attached server.py with python3 server.py to start the local server.
  2. Navigate to either http://127.0.0.1:1337/?blob or http://127.0.0.1:1337/?worker.js in the browser. This will trigger the page to spawn a Web Worker using either a Blob URL or the worker.js script.
  3. The worker will attempt to establish an EventSource connection to http://127.0.0.1:1337/bypass?blob or http://127.0.0.1:1337/bypass?worker.js.

Expected results

The connection should be blocked by the connect-src 'none' CSP.

Actual results

The connection is successfully established.

CREDIT INFORMATION

Reporter credit: lebr0nli of National Yang Ming Chiao Tung University, Dept. of CS, Security and Systems Lab.

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

Impact

An attacker could bypass a restrictive connect-src CSP to establish EventSource connections to arbitrary URLs.

What the attacker needed

Victim visits a malicious page; page uses a Web Worker; CSP with connect-src 'none'

How it was found

  1. Run the attached server script to start a local server.
  2. Navigate to a URL that causes the page to spawn a Web Worker using either a Blob URL or a script file.
  3. The worker attempts to open an EventSource connection to a bypass endpoint.

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 (CSP) is a rule set that tells the browser which network connections a page is allowed to make. This report shows that when a page uses a background script called a Web Worker to open a special type of connection called EventSource, the browser ignores the rule that should block it. That means a malicious page could talk to servers it is not supposed to.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

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

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.