Closed
Bug 1198990
Opened 11 years ago
Closed 11 years ago
Cross-site security vulnerability in file viewer
Categories
(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)
addons.mozilla.org Graveyard
Admin/Editor Tools
Tracking
(Not tracked)
RESOLVED
FIXED
2015-09-03
People
(Reporter: jwkbugzilla, Assigned: kmag)
Details
(4 keywords)
Attachments
(1 file)
|
1012 bytes,
application/x-xpinstall
|
Details |
File viewer is currently assuming that file names are safe. That's not the case - a ZIP file can contain files with pretty much any name. Steps to reproduce:
1. Upload the attached extension to AMO and request full review.
2. Now log in as a reviewer, go to the full review queue and click on "XSS via file names."
3. Browse through the contents of the extension and click on the file named "some very long.."
4. The file contents try to trick you into reloading the page - do that.
You will see an alert message saying "xss" - JavaScript code was executed in your browser and might approve the add-on for example. The file name has malicious HTML code in it, and it will run JavaScript whenever this file is opened in the file viewer. The code isn't executed when you navigate from another file however, that's why you need to reload the page first.
| Reporter | ||
Comment 2•11 years ago
|
||
The problem is apparently caused by this line:
https://github.com/mozilla/olympia/blob/6ddb7508377be38ae7273ce4af77e908b0aa0e9e/static/js/zamboni/files.js#L675
If there are already a sufficient number of breadcrumbs (switching between files) the safe jQuery.text() function is being used. However, if the third breadcrumb isn't there yet (initial load) the unsafe jQuery.append() function is used and file name not escaped.
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → kmaglione+bmo
Severity: normal → critical
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•11 years ago
|
||
| Assignee | ||
Comment 4•11 years ago
|
||
This vulnerability specifically affects add-on reviewers, who have elevated privileges on AMO. I believe this qualifies for a sec bounty.
Keywords: sec-critical
| Assignee | ||
Comment 5•11 years ago
|
||
This fix won't go into a public repo until just before we push:
https://github.com/mozilla/olympia-security/compare/2015.08.20...2015.08.31
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2015-09-03
Updated•11 years ago
|
Flags: sec-bounty?
Updated•10 years ago
|
Flags: sec-bounty? → sec-bounty+
Updated•10 years ago
|
Keywords: wsec-injection,
wsec-xss
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
Updated•10 years ago
|
Group: client-services-security
Updated•10 years ago
|
Flags: needinfo?(amuntner)
Updated•8 years ago
|
Flags: needinfo?(wclouser)
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•