Closed Bug 1199173 Opened 11 years ago Closed 10 years ago

Cross-site scripting vulnerability in collection autocomplete

Categories

(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwkbugzilla, Assigned: magopian)

Details

(Keywords: reporter-external, sec-high, wsec-xss)

Steps to reproduce: 1. Create a collection with the following name: > Whatever<img src="dummy" onerror="alert('xss')"> 2. Now log in as an admin user and go to https://addons.mozilla.org/en-US/admin/features 3. Click "Add a Featured Collection". 4. Click "Save Changes" 5. Type "whatever" into the collection name field. The alert message "XSS" will appear - the autocomplete popup failed to escape HTML code in the collection's title. Note that step 4 might be unnecessary but the field is initially read-only in my install for some reason.
I think that the problem is https://github.com/mozilla/olympia/blob/966195c76f7d8e40d842c3bf4d74301947f52cfa/static/js/zamboni/admin_features.js#L88 - item.name isn't being escaped here. The selection code in line 59 above is likely problematic as well.
Thank you Wladimir, confirmed.
Group: addons-security
Whiteboard: [sec-high]
Andy, I'm triaging a bunch of bugs - any particular way I should tag them/etc to bubble up to the right queue?
Flags: needinfo?(amckay)
Assignee: nobody → me
Fix is sitting in the olympia-security repo on the xss-dropdown branch. https://github.com/mozilla/olympia-security/tree/dropdown-xss Where shall I pull request this?
(In reply to Mike Nolan [:nolski] from comment #4) > Fix is sitting in the olympia-security repo on the xss-dropdown branch. > https://github.com/mozilla/olympia-security/tree/dropdown-xss Where shall I > pull request this? You can make a pull request on the olympia-security branch to master on that branch. When its time to add to olympia you can just move the patch over. We documented some of this for the Marketplace and the flow seems similar: https://mana.mozilla.org/wiki/display/MARKET/Security+fixes
Flags: needinfo?(amckay)
I also can't reproduce this bug. The button for "Add a Featured Collection" seems broken.
I'm confused as to the status of this bug.
:andym it looks like the "Add a Featured Collection" button no longer will actually add a featured collection. So due to that I can no longer re-produce this bug.
(In reply to Mike Nolan [:nolski] from comment #8) > :andym it looks like the "Add a Featured Collection" button no longer will > actually add a featured collection. So due to that I can no longer > re-produce this bug. So let's fix "Add a Featured Collection"?
Flags: sec-bounty?
Keywords: sec-high, wsec-xss
Whiteboard: [sec-high]
Assignee: me → nobody
Assignee: nobody → magopian
Iteration: --- → 45.3 - Dec 14
Thanks! I can't see that repo. Is the fix in prod now?
Flags: needinfo?(magopian)
It is!
Flags: needinfo?(magopian)
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Please resolve fixed bugs as fixed, especially when they are nominated for bounties.
Flags: sec-bounty? → sec-bounty+
Product: addons.mozilla.org → addons.mozilla.org Graveyard
This should be public I think.
Flags: needinfo?(amuntner)
Group: addons-security, client-services-security
Flags: needinfo?(amuntner)
You need to log in before you can comment on or make changes to this bug.