Skip to content
XSS Disclosed report Intermediate

Blob URLs do not inherit CSP from originating page

A page that creates a Blob URL does not pass its Content Security Policy (CSP) to that Blob URL. An attacker could open the Blob URL directly and run scripts that the original page's CSP would have blocked.

Jun Follow

Originally disclosed on Mozilla

  • Paid in 5.5 years
  • Disclosed after under an hour
Text
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36

Steps to reproduce:

1. Go to https://vuln.shhnjk.com/blob_csp.html
2. Copy Blob URL and paste it into address bar
3. Press enter


Actual results:

CSP is bypassed.


Expected results:

https://github.com/w3c/FileAPI/issues/142

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

What the attacker needed

Victim opens a Blob URL directly

How it was found

  1. Open the test page that creates a Blob URL.
  2. Copy the Blob URL.
  3. Paste the Blob URL into the address bar and press enter.

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 your browser to limit what scripts can run. A Blob URL is a temporary address for data created by a page. This report says that when you open the Blob URL directly, the browser forgets the original page's CSP rules, so scripts that should be blocked can run.

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 Jun

View all

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

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.