Skip to content
XSS Disclosed report

Cross-site scripting vulnerability via add-on version

Wladimir Palant Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months
Text
Open the JavaScript Deobfuscator add-on versions statistics:

https://addons.mozilla.org/en-US/firefox/addon/javascript-deobfuscator/statistics/usage/versions/?last=30

Scroll to the right end of the table, there is version 2.0.3 listed there (there is currently no JavaScript Deobfuscator 2.0.3). If you inspect this table header you will see an empty <img> tag there. The problematic code line here is https://github.com/mozilla/olympia/blob/966195c76f7d8e40d842c3bf4d74301947f52cfa/static/js/impala/stats/table.js#L80 - it doesn't escape the data in table headers.

I opened the following URL to inject HTML code here:

> https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&id=[address removed]&version=2.0.3%3Cimg%3E&maxAppVersion=43.0&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&appVersion=40.0&appOS=Darwin&appABI=x86_64-gcc3&locale=en-US&currentAppVersion=40.0&updateType=112&compatMode=normal

This is a normal update check, merely the version parameter has been messed with. It's hard to reproduce the environment used to process AMO logs so I had to test against production - that's why I didn't bother going beyond a simple <img> tag and didn't really test the processing for the other fields either.

If I understand https://github.com/mozilla-metrics/Log-Processing-ETL/blob/0c5b328fc3b0042baef0c4409a426d1536f3dc54/etl/amo/parse_amo_versioncheck_requests.ktr#L456 correctly, the log processing doesn't apply any restrictions on the add-on version number beyond limiting it to 25 characters (before reversing URL encoding). Getting a malicious payload into 25 characters is hard but I wouldn't consider it impossible. At the very least, version=<style>*{display:none} is definitely possible, it will make the statistics unusable for some add-ons. version=<embed src=//bit.ly/1hXiSgS> is a bit too long but getting rid of three characters should be possible (by registering dxszw.us if nothing else works).

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.

What is known

A high-severity XSS bug in Statistics. Mozilla made it public on 25 November 2015.

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