Skip to content
Access control Disclosed report Advanced CVE-2020-15664

InstallTrigger can take the principal from the wrong inner window when initialized

A window reference to the eval function from about:blank could be used to inherit permissions of a subsequently loaded privileged page, allowing an extension install attempt. The secondary permission prompt still blocked a full install, but the flaw could enable further exploitation.

Kaizer Soze Follow

Originally disclosed on Mozilla

  • Fixed in 6 days
  • Paid in 18 days
  • Disclosed after 6 days
Text
Created attachment 9169064
inheritPermissions-testcase-new.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

I created a form, that first loads about:blank into a full new window.  I then used the onsubmit handler to load https://fpn.firefox.com/ into this window which has the extension install permission, while holding a reference to the eval function for that window.  Upon submitting the form I have scripted an install of ghostery.


Actual results:

The secondary prompt still displays, which asks a user for permissions to be allowed.  Currently this stops a full install of a webextension, but allows for one to attempt more exploitation by manipulating input into Extensions.jsm.


Expected results:

Holding a reference to the eval function of a window should not allow one to inherit permissions of the window that is loaded.  This allows all permissions to be inherited but proper defense in depth stops things like accessing video/microphone streams.

Storage APIs may still be able to be manipulated, as I have not had time to fully test this.  This could allow one to pollute the local storage of extensions, and persistent webworker pages.

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

How it worked

Impact

An attacker could attempt to install a browser extension without full user consent, though a secondary permission prompt still blocked a complete install; other permissions might also be inherited.

What the attacker needed

Victim visits attacker-controlled page; attacker can open a new window

How it was found

  1. Create a form that first loads about:blank into a new full window.
  2. Use the onsubmit handler to load a privileged page into that window while holding a reference to its eval function.
  3. Submit the form and script an extension install.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

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

When a web page opens a new window, it can keep a reference to functions like eval from that window. If the window later navigates to a trusted site, the old reference might still work and inherit the new site's permissions. Here, that let the attacker try to install a browser extension, though a second prompt still appeared.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.