Skip to content
XSS Disclosed report Intermediate CVE-2016-9901

Remote code execution vulnerability in Pocket extension

The Pocket extension inserted tags received from the remote getpocket.com server into the page as HTML without sanitising them. If that server were compromised, an attacker could run JavaScript in the about:pocket-saved page and use the extension's messaging API in both directions.

Wladimir Palant Follow

Originally disclosed on Mozilla

  • Fixed in 6 days
  • Paid in 25 days
  • Disclosed after 6 days
Text
The following line will process tags received from a remote server (getpocket.com) as HTML code without doing any sanitizing:

https://hg.mozilla.org/mozilla-central/file/34fce7c12173bdd6dda54c2ebf6d344252f1ac48/browser/extensions/pocket/content/panels/js/saved.js#l33

If this server is compromised it will be able to run JavaScript code in the context of the about:pocket-saved page whenever the user saves something to Pocket. This page isn't privileged and it is properly isolated in <iframe type="content">. However, at the very least it has access to the Pocket extension's messaging API already outlined in bug 1320039 - and unlike with the proof-of-concept there the communication can go both ways here.

The original report as published on Mozilla's Bugzilla, by Wladimir Palant. 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 the extension treated server-supplied tag strings as HTML and inserted them without sanitising or escaping them.

Impact

If getpocket.com were compromised, an attacker could run JavaScript in the about:pocket-saved page and use the extension's messaging API in both directions, though the page is unprivileged and isolated in a content iframe.

What the attacker needed

Compromise of getpocket.com; user saves something to Pocket

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 showed labels (tags) that came from a website, and it put them on the page as if they were part of the page's own code. If someone took over that website, they could slip in a small script that runs inside the extension's page. That page is not fully privileged, but it can still talk to the extension through its messaging feature.

What is XSS?

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

More by Wladimir Palant

View all

30 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.

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.