Using XBL scopes its possible to steal(clone) native anonymous content.
Originally disclosed on Mozilla
- Fixed in 60 days
- Paid in 2 months
- Disclosed after 60 days
Created attachment 798654
cloneAnon.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130814063812
Steps to reproduce:
I used an iframe with a data URL to load an XML file to get access to the observe function that xml pretty print bindings provide, I then used this function and some finagling to get fully anonymous content appended as a child of content that was accessible from the XML iframe. This works because the observe function shares the scope with other anonymous content that might be provided with other bindings. I believe its actually a cross-compartment wrapper bypass. The interesting part is that once the anonymous content that is inaccessible is the child of content I can access, that cloneNode(true) clones that content and makes a fully accessible clone. I cant help but reference my bug here:
https://bugzilla.mozilla.org/show_bug.cgi?id=817922
which points out way back then that this would probably come to pass. Ill be CC'ing bholley on this one because i mentioned it to him some months back now, I just haven't had time at all lately to focus on security research and I'm even using my day off for labor day weekend to get this public ASAP. I've also noticed that in the newest nightly these XUL elements I'm cloning have become HTMLDivElements. I assume that change is to mitigate future problems like this, and maybe in those instances someone wouldn't even realize that they had gained access to native anonymous content. As I've said I have very little time lately, so please fill in the blanks and correct me on what I'm wrong about here. Thanks.
Actual results:
Using this technique I was able to clone an XUL element being provided as anonymous content from the pluginProblem.xml bindings.
Expected results:
The reference to the XUL element that can be obtained by using document.getAnonymousNodes/document.getAnonymousElementByAttribute should not allow itself to be appended to the content accessible from the XML iframe.
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 high-severity security bug in XBL. Mozilla made it public on 1 November 2013 as CVE-2014-1479.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.