Closed Bug 619650 Opened 15 years ago Closed 15 years ago

XSS vulnerability in review display on addons.mozilla.org

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: ricky, Assigned: jbalogh)

Details

(Keywords: reporter-external, sec-critical, wsec-xss, Whiteboard: [infrasec:xss][ws:critical])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0b7) Gecko/20101111 Firefox/4.0b7 Build Identifier: The following URL outputs the commenter's display name without sanitizing it: https://addons.mozilla.org/en-US/firefox/addon/264279/reviews/259194/ Reproducible: Always
Sorry, it's actually the addon developer's display name, not the commenter's.
OS: Linux → All
Hardware: x86_64 → All
Whiteboard: [infrasec:xss][ws:high]
Ugh, sorry for the spam, I was right the first time.
Here's an attempt at a patch to fix the issue.
Assignee: nobody → jbalogh
Status: UNCONFIRMED → NEW
Ever confirmed: true
I changed my display_name to the same <script> as yours but I can't reproduce this on our preview server: https://addons.allizom.org/en-US/firefox/addon/1865/reviews/254945/. We should be able to trust Jinja to escape the interpolated variables within {% trans %}.
In [3]: import jingo In [4]: jingo.env.from_string("""{% trans x='<script>' %}ff{{ x }}{% endtrans %}""").render() Out[4]: u'ff&lt;script&gt;'
We were running an older version of Jinja in production than we have in preview. I was not aware of any security issues with Jinja 2.3, but now we are on 2.5.5. Thanks Ricky!
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Awesome, thanks for the quick fix!
Whiteboard: [infrasec:xss][ws:high] → [infrasec:xss][ws:critical]
Verified FIXED on prod: https://addons.mozilla.org/en-US/firefox/addon/264279/reviews/259194/. No XSS-capable alert() thrown.
Status: RESOLVED → VERIFIED
Summary: XSS vulnerability in review display → XSS vulnerability in review display on addons.mozilla.org
Group: client-services-security
Comment on attachment 498082 [details] [diff] [review] Escape user in review_list Review of attachment 498082 [details] [diff] [review]: ----------------------------------------------------------------- nice.
Adding keywords to bugs for metrics, no action required. Sorry about bugmail spam.
Keywords: wsec-xss
Flags: sec-bounty+
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: