Skip to content
XSS Disclosed report Intermediate CVE-2018-5116

An extension can XSS any domain with only the ActiveTab permission using frames

Ronen Zilberman Follow

Originally disclosed on Mozilla

  • Fixed in 4 months
  • Paid in 4 months
  • Disclosed after 4 months
Text
Created attachment 8904038
poc.zip

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170824053622

Steps to reproduce:

The ActiveTab permission allows an extension to only access the current tab (after the user interacted with the extension). This is to allow "extensions to fulfill a common use case, without having to give them very powerful permissions" like <all_urls> (quote from the documentation).

However, it was found that this permission also allows access to frames within the tab that can be of a different domain. This allows a malicious extension, that requested only a very strict permission set, to still interact with any domain:
1. The extension injects code into the tab that creates a hidden iframe to an arbitrary domain.
2. The extension then injects code into that frame creating an XSS situation. This obviously allows for many kinds of nefarious actions such as theft of information, request forgery etc.


--------------------------------------------------------------------------
To recreate:
1. Inject code that creates a hidden iframe
2. Wait for the frame to load
3. inject any script into that frame

I provide a POC extension that shows a browser action (button). When clicked, a hidden iframe to "https://example.com" is created in the current tab and the cookies for that URL are console.log()ed. 
The extension only requests activeTab yet this works regardless of the URL of the active tab.


Actual results:

The malicious code runs in all the frames in the current tab, including the iframe that was just created.


Expected results:

The activeTab should allow access to the parent frame only, and not to any inner frames. This is the behaviour in the Chrome browser.

The original report as published on Mozilla's Bugzilla, by Ronen Zilberman. 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 XSS bug in Compatibility. Mozilla made it public on 11 January 2018 as CVE-2018-5116.

About XSS

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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.