Closed
Bug 821986
Opened 13 years ago
Closed 13 years ago
Persistent XSS Vulnerability in CKEditor(https://developer.mozilla.org/pt-PT/docs/HTML$edit?workbetterwith ="'><img src=x onerror=confirm(3);>)
Categories
(developer.mozilla.org :: Security, defect, P1)
developer.mozilla.org
Security
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: netfuzzerr, Assigned: groovecoder)
References
()
Details
(Keywords: reporter-external, wsec-xss, Whiteboard: test using Chrome [site:developer.mozilla.org][type:bug])
User Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.21 (KHTML, like Gecko) Chrome/25.0.1359.3 Safari/537.21
Steps to reproduce:
Hey Mozilla Buddies,
Is there any test server(like the landfill to test bugzilla bugs) to me play a little bit with developer.mozilla.org?
There's a cross site scripting that allows attackers to steal user cookies while the user edits the page.
Reproduce:
1. Log on developer.mozilla.org.
2. Click in "Source"
3. Add "<svg><circle onload=confirm(3)>" in some part of code.
4. Now click again in "Source".
5. See the alert.
Cheers,
Mario
| Reporter | ||
Updated•13 years ago
|
Summary: XSS Vulnerability on https://developer.mozilla.org/pt-PT/docs/HTML$edit → Persistent XSS Vulnerability on https://developer.mozilla.org/pt-PT/docs/HTML$edit
| Reporter | ||
Comment 1•13 years ago
|
||
Updated reproduce steps:
1. Log on developer.mozilla.org.
2. Go to https://developer.mozilla.org/pt-PT/docs/HTML$edit
3. Click in "Source"
4. Add "<svg><circle onload=confirm(3)>" in some part of code.
5. Now click again in "Source".
6. See the alert.
After edited you can save the changes. So go back to https://developer.mozilla.org/pt-PT/docs/HTML$edit see the vulnerability as a persistent XSS.
| Reporter | ||
Comment 2•13 years ago
|
||
Can this bug be eligible for a bounty?
This site is not officially in our list of eligible sites. This means we have to decide if your bug is worth making an exception and potentially setting a precedent.
We do appreciate learning about bugs in all of our sites. We publish a list of eligible sites for people who are only interested in bounties and we hope that can help reduce the frustration of wasting time in unfruitful areas.
http://www.mozilla.org/security/bug-bounty-faq-webapp.html#eligible-bugs
I will nominate this bug and see if the committee accepts it.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: sec-bounty?
Comment 4•13 years ago
|
||
This reproduces in Chrome but not Firefox (likely due to a spec-compliance bug 571134). MDN will still want to fix this.
I'm not seeing the persistent XSS though. Is it a self-xss?
Whiteboard: test using Chrome
Comment 5•13 years ago
|
||
Nevermind, didn't save it correctly. It's persistent.
Not sure there are any cookies worth stealing--the site's auth is based on Persona now--but you could certainly cause it to appear someone else did a bunch of bogus edits or maybe that the trusted MDN site is recommending a bogus download.
| Reporter | ||
Comment 6•13 years ago
|
||
Yep, this poc doesn't work for Firefox. But try with payload "<svg><svg onload=confirm(3)>" with Firefox and see the alert.
(In reply to Daniel Veditz [:dveditz] from comment #4)
> This reproduces in Chrome but not Firefox (likely due to a spec-compliance
> bug 571134). MDN will still want to fix this.
>
> I'm not seeing the persistent XSS though. Is it a self-xss?
| Reporter | ||
Comment 7•13 years ago
|
||
After you saved the code with the payload "<svg><svg onload=confirm(3)>" go to https://developer.mozilla.org/pt-PT/docs/HTML$edit see the alert as a persistent xss.
This can be exploited to get privileges from admins who will try edit this page.
(In reply to Daniel Veditz [:dveditz] from comment #4)
> I'm not seeing the persistent XSS though. Is it a self-xss?
| Reporter | ||
Comment 8•13 years ago
|
||
For exemple visit now this url https://developer.mozilla.org/pt-PT/docs/HTML$edit while logged and see the alert.
| Assignee | ||
Comment 9•13 years ago
|
||
Which bug should be the canonical bug? This bug or bug 821988? Please mark one as a duplicate, or change the summaries to show the difference.
MDN has both a dev and stage server:
http://developer-dev.allizom.org/
https://developer.allizom.org/
If you want to put PoC's on those servers we'll be able to test when a fix lands on master (dev) and is pushed to stage.
| Reporter | ||
Comment 10•13 years ago
|
||
What makes you think that this bug is duplicate of bug 821988? They are different bugs and in different places.
(In reply to Luke Crouch [:groovecoder] from comment #9)
> Which bug should be the canonical bug? This bug or bug 821988? Please mark
> one as a duplicate, or change the summaries to show the difference.
>
> MDN has both a dev and stage server:
>
> http://developer-dev.allizom.org/
> https://developer.allizom.org/
>
> If you want to put PoC's on those servers we'll be able to test when a fix
> lands on master (dev) and is pushed to stage.
Summary: Persistent XSS Vulnerability on https://developer.mozilla.org/pt-PT/docs/HTML$edit → Persistent XSS Vulnerability on html editor(https://developer.mozilla.org/pt-PT/docs/HTML$edit)
| Reporter | ||
Comment 11•13 years ago
|
||
I didn't understand. Can you explain more your question?
(In reply to Luke Crouch [:groovecoder] from comment #9)
> Which bug should be the canonical bug? This bug or bug 821988?
| Assignee | ||
Comment 12•13 years ago
|
||
Oh, sorry. I saw both happening on an 'HTML' page so I assumed they were the same.
http://ckeditor.com/demo is also vulnerable so this is a bug in CKEditor (too).
Summary: Persistent XSS Vulnerability on html editor(https://developer.mozilla.org/pt-PT/docs/HTML$edit) → Persistent XSS Vulnerability in CKEditor(https://developer.mozilla.org/pt-PT/docs/HTML$edit)
Updated•13 years ago
|
Component: Editing → Security
Comment 13•13 years ago
|
||
What the fix for this going to be, Luke?
| Assignee | ||
Comment 15•13 years ago
|
||
We will be moving off CKEditor "soon" - i.e., within the next couple months.
Updated•13 years ago
|
Whiteboard: test using Chrome → test using Chrome [site:developer.mozilla.org]
Updated•13 years ago
|
Flags: sec-bounty? → sec-bounty+
| Reporter | ||
Comment 17•13 years ago
|
||
"Flags: sec-bounty? → sec-bounty+" this means that this bug is eligible for a bounty?
Comment 18•13 years ago
|
||
(In reply to Mario Gomes from comment #17)
> "Flags: sec-bounty? → sec-bounty+" this means that this bug is eligible for
> a bounty?
sec-bounty+ means the committee has decided to pay a bounty on the bug. You should be receiving an email from Chris Hofmann with more details.
Comment 19•13 years ago
|
||
(In reply to Luke Crouch [:groovecoder] from comment #12)
> http://ckeditor.com/demo is also vulnerable so this is a bug in CKEditor
> (too).
Have we reported this upstream to CKEditor?
Comment 20•13 years ago
|
||
I did so a month ago:
http://dev.ckeditor.com/ticket/9930
| Reporter | ||
Updated•13 years ago
|
Summary: Persistent XSS Vulnerability in CKEditor(https://developer.mozilla.org/pt-PT/docs/HTML$edit) → Persistent XSS Vulnerability in CKEditor(https://developer.mozilla.org/pt-PT/docs/HTML$edit?workbetterwith="'><img src=x onerror=confirm(3);>)
| Reporter | ||
Comment 24•13 years ago
|
||
if you fix this bug, won't fix the bug https://bugzilla.mozilla.org/show_bug.cgi?id=851799. I don't understand why do you think that that's a duplicate.
Comment 26•13 years ago
|
||
Is this blocked by CKEditor, or should we fix it ourselves before they get to it?
Flags: needinfo?(dchan+bugzilla)
Updated•13 years ago
|
Priority: -- → P1
Updated•13 years ago
|
Whiteboard: test using Chrome [site:developer.mozilla.org] → test using Chrome [site:developer.mozilla.org][specification-like][type:bug]
Comment 27•13 years ago
|
||
(In reply to John Karahalis [:openjck] from comment #26)
> Is this blocked by CKEditor, or should we fix it ourselves before they get
> to it?
Given the uncertainty in the CKEditor timeline, we should try to fix this ourselves.
Flags: needinfo?(dchan+bugzilla)
Updated•13 years ago
|
Whiteboard: test using Chrome [site:developer.mozilla.org][specification-like][type:bug] → test using Chrome [site:developer.mozilla.org][type:bug]
Updated•13 years ago
|
Assignee: nobody → lcrouch
Updated•13 years ago
|
Priority: P1 → P2
| Assignee | ||
Updated•13 years ago
|
Priority: P2 → P1
Comment 29•13 years ago
|
||
After some thought, this is something we should process on the server side. Users can change HTML directly via the "Source" button and so preventing this problem on the client side is near-impossible.
I'll see where we can clean this on the server side.
| Assignee | ||
Comment 30•13 years ago
|
||
Use a html5lib filter for on____ attribute event handlers and apply to (at least) the $edit, $translate,and $raw views.
Comment 31•13 years ago
|
||
Adding keywords to bugs for metrics, no action required. Sorry about bugmail spam.
Keywords: wsec-xss
| Assignee | ||
Comment 32•13 years ago
|
||
This was fixed by https://github.com/mozilla/kuma/pull/1125
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 33•13 years ago
|
||
That fix will fix online the XSS for <svg onload> payload , but it still reproduce using a <meta> payload. I'll report it as a new bug.
Comment 35•10 years ago
|
||
For bugs that are resolved, we remove the security flag. These haven't had their flag removed, so I'm removing it now.
Group: websites-security
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•