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.
- Fixed in 3.5 years
- Paid in 35 days
- Disclosed after 3.5 years
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.
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
- Navigate to the test page that sets a CSP sandbox header.
- Observe that a modal dialog appears.
- 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.