Skip to content
RCE Disclosed report Advanced

Confirming install prompt for trusted addon may execute arbitrary privileged code instead

A malicious website could trigger an install prompt for a trusted, signed add-on but actually install a rogue extension, leading to code execution with system principal privileges. The attack exploits the auto-download/open behaviour introduced in Firefox 97 and flaws in add-on integrity verification.

Armin Ebert Follow

Originally disclosed on Mozilla

Critical View original
  • Fixed in 4 days
  • Paid in 8 days
  • Disclosed after 4 days

Created attachment 9261567 poc-ubuntu-ff-beta-97.0b9.gif

An attacker-controlled site may prompt the user to install an official, signed addon which instead installs a rogue extension, allowing code execution with system principal privileges.

The attack is facilitated by the new auto-download/-open behavior since FF 97, and how addon integrity is verified during installation. I could repro it on {Linux,Windows} x Firefox {Beta,Nightly} with default settings.

Proof of concept

The attached GIF shows the UX of the attack on Ubuntu + Firefox Beta 97.0b9.

  • The user visits https://attacker.example/poc.html.

  • An installation prompt for the trusted "Mozilla Rally" extension pops up.

  • The user accepts, causing the browser to execute a JS payload with chrome privileges.

Note that the PoC uses a service worker which requires HTTPS. Also, you may need to increase delays between the attack steps on slower systems, although the PoC seemed reliable on my end.

I'll follow up with more details.

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

Root cause

Likely a race condition or integrity-check bypass during add-on installation, combined with the new auto-download/open behaviour in Firefox 97, allows a rogue extension to be installed under the guise of a trusted one.

Impact

An attacker could execute arbitrary code with system principal privileges, potentially compromising the user's browser and system.

What the attacker needed

Victim visits attacker-controlled site; victim accepts install prompt; Firefox 97 or later

How it was found

  1. The user visits a malicious webpage.
  2. An installation prompt for the trusted 'Mozilla Rally' extension appears.
  3. The user accepts the prompt.
  4. The browser executes a JavaScript payload with chrome privileges.

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 you install a browser add-on, the browser checks that it is signed by Mozilla to ensure it is safe. This report shows that a malicious website could trick the browser into showing a prompt for a legitimate add-on but then install a different, harmful one. That harmful add-on could then run code with high privileges, potentially taking control of the browser or system.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Armin Ebert

View all

18 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.