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)

defect

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
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
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.
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?
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
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.
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?
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?
For exemple visit now this url https://developer.mozilla.org/pt-PT/docs/HTML$edit while logged and see the alert.
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.
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)
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?
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)
Component: Editing → Security
What the fix for this going to be, Luke?
We will be moving off CKEditor "soon" - i.e., within the next couple months.
Whiteboard: test using Chrome → test using Chrome [site:developer.mozilla.org]
Flags: sec-bounty? → sec-bounty+
"Flags: sec-bounty? → sec-bounty+" this means that this bug is eligible for a bounty?
(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.
(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?
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);>)
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.
Is this blocked by CKEditor, or should we fix it ourselves before they get to it?
Flags: needinfo?(dchan+bugzilla)
Priority: -- → P1
Whiteboard: test using Chrome [site:developer.mozilla.org] → test using Chrome [site:developer.mozilla.org][specification-like][type:bug]
(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)
Blocks: 851799
Blocks: 847273
Whiteboard: test using Chrome [site:developer.mozilla.org][specification-like][type:bug] → test using Chrome [site:developer.mozilla.org][type:bug]
Assignee: nobody → lcrouch
Priority: P1 → P2
Priority: P2 → P1
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.
Use a html5lib filter for on____ attribute event handlers and apply to (at least) the $edit, $translate,and $raw views.
Adding keywords to bugs for metrics, no action required. Sorry about bugmail spam.
Keywords: wsec-xss
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
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.
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
You need to log in before you can comment on or make changes to this bug.