Skip to content
Disclosed report CVE-2016-2816

CSP is not applied to documents sent through multipart/x-mixed-replace

Muneaki Nishimura Follow

Originally disclosed on Mozilla

  • Fixed in 34 days
  • Paid in 40 days
  • Disclosed after 34 days
Text
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

Steps to reproduce:

Open the following PoC.
http://mallory.csrf.jp/x-mixed-replace/csp/bad.php



Actual results:

The response from above URL is multipart/x-mixed-replace and it contains two text/html documents in it. Both documents triggers alert(1); and alert(2) from the inline-script. This URL is protected by CSP with default-src 'self' so the inline-script should be ignored but Firefox doesn't.


Expected results:

CSP should be applied to all documents in a multipart/x-mixed-replace response.
The inline script script execution should be ignored like ordinal HTML document (see following URL).
http://mallory.csrf.jp/x-mixed-replace/csp/good.php

The original report as published on Mozilla's Bugzilla, by Muneaki Nishimura. 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.

What is known

A medium-severity security bug in DOM: Security. Mozilla made it public on 15 December 2015 as CVE-2016-2816.

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

More by Muneaki Nishimura

View all

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