Closed
Bug 1319420
Opened 10 years ago
Closed 10 years ago
Page title not escaped, XSS vector
Categories
(developer.mozilla.org :: Security, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jwhitlock, Assigned: jwhitlock)
Details
(Keywords: reporter-external, sec-high, wsec-xss, Whiteboard: [specification][type:bug])
What did you do?
================
1. Edit a page
2. Select "Edit Page Title and Properties"
3. Change title to '</title><Img src=x onerror=alert(1)>'
4. Publish
What happened?
==============
The unescaped title is added to the page, and an alert is shown
What should have happened?
==========================
The title should have been escaped as '</title><Img src=x onerror=alert(1)>'
Is there anything else we should know?
======================================
First discovered by MDN user MuzammilAbbasKayani:
https://developer.mozilla.org/en-US/docs/Tools$revision/1145840
| Assignee | ||
Comment 1•10 years ago
|
||
Introduced with PR 3927 (August 2016), as a fix for bug 1243693. Some escaping is needed, and manual testing was insufficient to find the issue.
https://github.com/mozilla/kuma/pull/3927
Comment 2•10 years ago
|
||
Thanks for the report and the fix, John. I verified the issue on allizom.org, for good measure. This is definitely concerning given MDN is on mozilla.org and can hijack all cookies on that domain. Pushing a fix out to prod should be done ASAP.
I'm flagging this as reviewable for bug bounty. We'll need to find a way to contact the original reporter if this bug is elligible.
Comment 3•10 years ago
|
||
Additionally, I cannot recommend enough to enable CSP on MDN to prevent similar issues from reoccurring.
| Assignee | ||
Comment 4•10 years ago
|
||
Fix deployed to staging and production:
https://github.com/mozilla/kuma/commit/86f406d4f01e11a59c71f1ad86c0515cdc6765db
| Assignee | ||
Comment 5•10 years ago
|
||
Adding original reporter to CC list. Bug is fixed, so removing the privacy flag.
Group: websites-security
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 6•10 years ago
|
||
Yes it is Fixed now
| Comment hidden (off-topic) |
Comment 8•10 years ago
|
||
It is eligable for bounty?
Comment 9•10 years ago
|
||
The bounty committee meets weekly on mondays. We'll evaluate this bug and get back to you.
Comment 10•10 years ago
|
||
Tested and it looks good to me. Thank you very much for the extremely fast fix, John!
Sebastian
Status: RESOLVED → VERIFIED
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
Comment 14•9 years ago
|
||
MDN is explicitly not an eligible site for the bounty due to past vandalism and we are not able to award a cash bounty for this bug. We have marked this sec-bounty "+" so your name gets added to our Hall of Fame pages.
Flags: sec-bounty? → sec-bounty+
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
| Comment hidden (off-topic) |
Updated•9 years ago
|
Flags: needinfo?(dveditz) → needinfo?(abillings)
| Comment hidden (off-topic) |
Updated•9 years ago
|
Flags: needinfo?(dveditz)
Updated•9 years ago
|
Flags: needinfo?(dveditz) → needinfo?(rforbes)
Updated•9 years ago
|
Flags: needinfo?(rforbes) → needinfo?(april)
Comment 20•9 years ago
|
||
Oh, my apologies! At a cursory glance, I mistakenly thought that John Whitlock was the one who had found the bug.
How would you like to be credited? I should be able to get that fixed today.
Comment 21•9 years ago
|
||
I have to Credited With Muzammmil Abbas Kayani
Comment 22•9 years ago
|
||
The PR is open: https://github.com/mozilla/bedrock/pull/4740
My apologies for the mixup! :)
Flags: needinfo?(april)
Comment 24•9 years ago
|
||
It'll get updated whenever bedrock approves the PR and sychronizes.
Flags: needinfo?(april)
Updated•8 years ago
|
Flags: needinfo?(abillings)
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•