Closed Bug 1319420 Opened 10 years ago Closed 10 years ago

Page title not escaped, XSS vector

Categories

(developer.mozilla.org :: Security, defect)

All
Other
defect
Not set
normal

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 '&lt;/title&gt;&lt;Img src=x onerror=alert(1)&gt;' Is there anything else we should know? ====================================== First discovered by MDN user MuzammilAbbasKayani: https://developer.mozilla.org/en-US/docs/Tools$revision/1145840
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
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.
Assignee: nobody → jwhitlock
Status: NEW → ASSIGNED
Flags: sec-bounty?
Keywords: sec-high, wsec-xss
Additionally, I cannot recommend enough to enable CSP on MDN to prevent similar issues from reoccurring.
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
Yes it is Fixed now
It is eligable for bounty?
The bounty committee meets weekly on mondays. We'll evaluate this bug and get back to you.
Tested and it looks good to me. Thank you very much for the extremely fast fix, John! Sebastian
Status: RESOLVED → VERIFIED
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+
Flags: needinfo?(dveditz) → needinfo?(abillings)
Flags: needinfo?(dveditz)
Hey I m not listed In 2016 quater 4 hall of fame
Flags: needinfo?(dveditz)
Flags: needinfo?(dveditz) → needinfo?(rforbes)
Flags: needinfo?(rforbes) → needinfo?(april)
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.
I have to Credited With Muzammmil Abbas Kayani
The PR is open: https://github.com/mozilla/bedrock/pull/4740 My apologies for the mixup! :)
Flags: needinfo?(april)
Thanks When u going to Update the list?
Flags: needinfo?(april)
It'll get updated whenever bedrock approves the PR and sychronizes.
Flags: needinfo?(april)
Flags: needinfo?(abillings)
You need to log in before you can comment on or make changes to this bug.