Pocket extension unnecessarily exposes its messaging interface to web pages
The Pocket extension registered event listeners on the browser's document without verifying the event origin, allowing web pages to send messages that the extension would process. An attacker could use this to open arbitrary URLs, including privileged about: pages, and potentially delete Pocket items.
Originally disclosed on Mozilla
- Fixed in 6 days
- Paid in 25 days
- Disclosed after 6 days
Created attachment 8814034
Proof of concept webpage
Note: I am reporting this issue here rather than to Pocket because Pocket is an integral part of Firefox and cannot be disabled or removed by regular means.
The bubble displayed by the Pocket toolbar button is actually an <iframe> loading from either about:pocket-signup or about:pocket-saved. In order to communicate with that frame the Pocket extension registers event listeners on browser.xul's document, accepting untrusted events. The event listeners don't do anything to verify the origin of the event so that events bubbling up from the browser's content area will be processed as well.
Steps to reproduce (I tested with Firefox 53.0a1 nightly 2016-11-23 on macOS 10.12):
1. Make sure that E10S is disabled (with E10S events from content won't bubble up to the browser).
2. Click the Pocket button to make sure that the extension is initialized. It doesn't matter whether anything happens after that, you don't need to sign up with Pocket.
3. Now open the attached webpage in Firefox and click the "Open about:preferences with Sync tab selected".
This button will open about:preferences#sync page, something that web pages normally cannot do. Pop-up blocker doesn't affect this, so websites can open any number of pop-ups at any time this way. Security checks don't apply either so opening arbitrary file:///, chrome:// or about: URLs is possible.
Note that this only abuses "openTabWithUrl" message that Pocket listens to. There is a number of other message listeners which might also have abuse potential - e.g. "deleteItem" message allows deleting items from Pocket. Note also that the website can detect when its attack was successful because the Pocket extension will remove the event target from the page.
Also, this issue is completely avoidable. There is only one Pocket frame in the browser document, the event listeners could be registered directly on that iframe element rather than on the document - this would make sure that no events from other sources will be received.
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
The extension registered event listeners on the browser document without checking the event's origin, so events from web content were processed.
Impact
Websites could open arbitrary URLs, including privileged about: pages, and potentially delete Pocket items; this required E10S to be disabled.
What the attacker needed
E10S disabled; Pocket extension initialised; victim visits malicious page
The fix
The event listeners should be registered directly on the Pocket iframe element instead of the document.
How it was found
- Disable E10S so events from content bubble up to the browser.
- Click the Pocket button to initialise the extension.
- Open the proof-of-concept webpage and click the button to open about:preferences#sync.
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.
A browser extension listens for messages to control its pop-up. Because it didn't check where messages came from, any website could send fake messages. This let a website make the browser open special pages that normal web pages cannot open.
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.