Skip to content
Disclosed report Intermediate

CSP sandbox bypass with Blob

A page with a CSP sandbox directive that should block modals and popups instead allowed them when a Blob URL was used. An attacker could bypass the sandbox to show modal dialogs and open popups.

Jun Follow

Originally disclosed on Mozilla

  • Fixed in 3.5 years
  • Paid in 35 days
  • Disclosed after 3.5 years
Text
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce:

1. Go to https://test.shhnjk.com/sandboxed_blob.php


Actual results:

Modal dialog showed up. When clicking a link, popup is also allowed.


Expected results:

https://test.shhnjk.com/sandboxed_blob.php has "Content-Security-Policy: sandbox allow-scripts" which should prevent modals and popups.

The original report as published on Mozilla's Bugzilla, by Jun. 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 correctly apply the CSP sandbox restrictions to content loaded via a Blob URL.

What the attacker needed

Victim visits a crafted page; browser supports Blob URLs

How it was found

  1. Navigate to the test page that sets a CSP sandbox header.
  2. Observe that a modal dialog appears.
  3. Click a link and observe that a popup is allowed.

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 a website sends to the browser to limit what the page can do. The 'sandbox' rule is meant to block things like pop-up windows and modal dialogs. Here, the browser failed to enforce that rule when the page used a special kind of link called a Blob URL, so the restrictions were bypassed.

More by Jun

View all

17 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.