It's possible to use object element plugins to access anonymous content.
Originally disclosed on Mozilla
- Fixed in 14 months
- Paid in 4 months
- Disclosed after 14 months
Created attachment 8463364
bypassSOW-testcase-new.html
I encountered this twice during all the plugin related work I've been doing recently and was finally able to reproduce it. I usually use embed elements to load plugins and the key point here is that you have to use an object element. When using an object element to preview a plugin like pdfjs anonymous content is only generated as you plugin, where as with an embed element its there either way. This can lead to an interesting situation in which you load a normal URL into an object after loading a pdf document as a plugin and as a result the object actually has two windows associated with it, one directly as the window provided by the object, and another that's provided by the anonymous iframe generated when loading a plugin. If done in the proper order and with a window that's accessible to you being loaded in the anonymous iframe(using the view-source: protocol trick), the frameElement of the window accessible through window[#] becomes fully accessible and is no longer protected by a SOW. Here I take advantage of this to use the insertAdjacentHTML function and inject an iframe into the anonymous content with an onload attribute that provides script execution in the context of the Sandbox associated with the bindings that have provided the anonymous content. Lol I know that's tough to follow and it's why it took me a little time to figure out. Here I show accessing Components.interfaces which would allow QI'ing DOM objects into other interfaces they support. I also create a sandboxEval function on the window which allows access to most any anonymous content and even functions associated with the anonymous content that should only be visible to chrome level code. This one actually makes me a little sad, because it brings bug 1043787 back into play but even stronger than before the last release update. Once that bug is back in play bug 928211 also comes back into play fully. What made me sad about this is it seems that you can do even more nasty things with this SOW bypass than you could before all the extensive XBL work that had just finally given me some hope of most if not all the holes being filled. I'll let you guys gauge it from here in terms of importance and all that but I can tell you that this one is very very serious. With this you wouldn't even need the WindowProperties named window trick I previous used in 1043587. There's a real mess with these plugins honestly and I haven't even gotten to properly fuzzing the pdfjs code itself yet.
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 security bug in XBL. Mozilla made it public on 2 October 2015.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.