Bug 330026 - [Webapp][Security] Fix for Eclipse 3.6.2 Eclipse Help Server XSS
Summary: [Webapp][Security] Fix for Eclipse 3.6.2 Eclipse Help Server XSS
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.6.1   Edit
Hardware: PC other
: P3 major (vote)
Target Milestone: 3.6.2   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords: security
Depends on: 329582
Blocks:
  Show dependency tree
 
Reported: 2010-11-11 12:36 EST by Chris Goldthorpe CLA
Modified: 2011-06-10 14:22 EDT (History)
3 users (show)

See Also:


Attachments
Patch (2.60 KB, patch)
2010-11-11 12:38 EST, Chris Goldthorpe CLA
no flags Details | Diff
Patch version 2 including fix for endless loop in script in toolbar.jsp (3.34 KB, patch)
2010-11-19 13:15 EST, Chris Goldthorpe CLA
no flags Details | Diff
183492: Patch version 3 including fix for two endless loops in script in toolbar.jsp (3.67 KB, patch)
2010-11-22 12:48 EST, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Goldthorpe CLA 2010-11-11 12:36:33 EST
+++ This bug was initially created as a clone of Bug #329582 +++

Build Identifier: 20100917-0705

The /help/index.jsp URL is vulnerable to Cross Site 

See the sample exploit.

http://yehg.net/lab/pr0js/advisories/eclipse/helios/help_server_xss/eclipse_ie_xss_demo.htm


Reproducible: Always

Steps to Reproduce:
1. Open "Help Contents" under Help menu of Eclipse
2. Note its random port number by seeing status bar of Help Window
3. Request the follow URL with Internet Explorer

http://localhost:[REPLACE]/help/index.jsp?'onload='alert(0)

Replace [REPLACE] with your own port number.
Comment 1 Chris Goldthorpe CLA 2010-11-11 12:38:01 EST
Created attachment 182922 [details]
Patch
Comment 2 Chris Goldthorpe CLA 2010-11-11 12:40:23 EST
Vivian, can you review this patch?
Comment 3 Hao Zhang CLA 2010-11-18 11:21:22 EST
Still can see the problem with url --> http://localhost:[REPLACE]/help/advanced/content.jsp?'onload='alert(0)
Comment 4 Chris Goldthorpe CLA 2010-11-18 12:57:40 EST
That's strange - which browser were you using when you tested? I just tested using IE ( 8.0 ) and the problem reproduced without the patch, then when I added the patch and restarted an infocenter the problem was no longer there. With Firefox 3.6 I did not see a pop up dialog with or without the patch. Did you clear the cache in your browser?
Comment 5 Chris Goldthorpe CLA 2010-11-18 16:34:23 EST
I'm now able to see that there is still a problem. Under certain circumstances - opening the URL from another help page is one I see a warning in IE8 which says that the page has been modified to prevent an XSS vulnerability. I do not always see the warning but this tells me that there is still a problem.

The review process is working as intended - I will investigate further. What browser did you use and what were the exact symptoms you saw?
Comment 6 Hao Zhang CLA 2010-11-19 09:08:48 EST
It really fix XSS vulnerability. But it still causes unresponsive script. Both in FF and IE.
Comment 7 YGN Ethical Hacker Group CLA 2010-11-19 12:39:00 EST
IE 8+ will always give you an XSS warning for suspicious urls even if the web application is not vulnerable.
Comment 8 Chris Goldthorpe CLA 2010-11-19 13:15:17 EST
Created attachment 183492 [details]
Patch version 2 including fix for endless loop in script in toolbar.jsp
Comment 9 Chris Goldthorpe CLA 2010-11-19 13:17:22 EST
I have added a fix for the unresponsive script. Please review my new patch.
Comment 10 Hao Zhang CLA 2010-11-21 21:48:54 EST
Chris, here is some enhancement:

With this fix, unresponsive script has been fixed when visiting http://localhost:[REPLACE]/help/advanced/content.jsp?'onload='alert(0)

But when user click maxmize button, unresponsive script will occur, so I think same logic should also be modified in method toggleFrame() in toolbar.jsp.
Comment 11 Chris Goldthorpe CLA 2010-11-22 12:48:45 EST
Created attachment 183586 [details]
183492: Patch version 3 including fix for two endless loops in script in toolbar.jsp

This fixes the endless loop when the maximize button is pressed. Opening content.jsp on it's own outside a frame is not a recommended way of using the help system but it's still a good idea to remove the possibility of an endless loop. Once these fixes are approved I will port the changes to toolbar.jsp back to HEAD.
Comment 12 Hao Zhang CLA 2010-11-22 20:50:55 EST
Latest patch looks good. Verified.
Comment 13 Chris Goldthorpe CLA 2010-11-22 22:32:17 EST
Thanks, Vivian
Comment 14 Chris Goldthorpe CLA 2010-11-23 12:42:10 EST
Patch applied to 3.6 maintenance stream, FIXED.
Comment 15 John Arthorne CLA 2011-06-10 14:22:00 EDT
Removing security restriction for bugs that have been fixed in 3.6.2 or earlier.