Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 375751

Summary: [Help] Security vulnerabilities in deferredView.jsp
Product: [Eclipse Project] Platform Reporter: Chris Austin <ChrisAustin>
Component: User AssistanceAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: daniel_megert, stephen.francisco, wayne.beaton, yxzhong, zhhaohh
Version: 3.8   
Target Milestone: 3.4.2+   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 328975, 378977, 378979    
Bug Blocks:    
Attachments:
Description Flags
Potential fix
none
Fix with updated copyright daniel_megert: review+

Description Chris Austin CLA 2012-03-30 13:42:14 EDT
There are 2 related vulnerabilities in /org.eclipse.help.webapp/advanced/deferredView.jsp, involving the href parameter:


Open Redirect:
To Reproduce: http://127.0.0.1:10000/help/advanced/deferredView.jsp?href=http://www.google.com

Cross Site Scripting:
To Reproduce: http://127.0.0.1:10000/help/advanced/deferredView.jsp?href=javascript:alert%28document.cookie%29;
Comment 1 Chris Austin CLA 2012-03-30 13:57:02 EDT
Created attachment 213402 [details]
Potential fix

This fix prepends the href used on the page with the base URL (http://etc/help/advanced)
Comment 2 Chris Austin CLA 2012-04-03 09:43:00 EDT
Created attachment 213496 [details]
Fix with updated copyright

Forgot the copyright, added to patch.
Comment 4 Dani Megert CLA 2012-04-04 10:57:53 EDT
3.4.2+:
Tagged 'org.eclipse.help.webapp' with 'r34x_20120404' and updated map file

3.5.2+:
Tagged 'org.eclipse.help.webapp' with 'r35x_20120404' and updated map file
Comment 5 Chris Austin CLA 2012-04-04 11:06:24 EDT
Thanks Dani!
Comment 6 Steve Francisco CLA 2012-04-11 14:54:19 EDT
I've built and verified that the fix works on the following older versions:
3.4.2+
3.5.2+
3.6.2+
Comment 7 Steve Francisco CLA 2012-05-04 10:14:27 EDT
We request that this remains classified as committer-only until at least July 1, 2012 to give affected teams time to adopt and distribute fixes as needed.
Comment 8 Hao Zhang CLA 2012-05-08 01:30:56 EDT
After applying the patch, it didn't address the security issue in deferredview.jsp. But  another problem is found: 

If we use the url like: "http://9.111.45.112:9999/help/advanced/deferredView.jsp?href=javascript:alert(1)". 
content of the advanced.jsp would be shown,  and AppScan will record this as a low level violation.

Please help to verify this issue.
Comment 9 Dani Megert CLA 2012-05-08 02:45:54 EDT
(In reply to comment #8)
> After applying the patch, it didn't address the security issue in
> deferredview.jsp. But  another problem is found: 
> 
> If we use the url like:
> "http://9.111.45.112:9999/help/advanced/deferredView.jsp?href=javascript:alert(1)". 
> content of the advanced.jsp would be shown,  and AppScan will record this as a
> low level violation.
> 
> Please help to verify this issue.

What version? I verified that the problem is fixed in 3.8 M7.
Comment 10 Hao Zhang CLA 2012-05-08 02:48:36 EDT
Version 3.6
Comment 11 Dani Megert CLA 2012-05-08 02:57:18 EDT
(In reply to comment #10)
> Version 3.6

So, you applied the patch yourself to 3.6?
Comment 12 Hao Zhang CLA 2012-05-08 03:00:33 EDT
Yes
Comment 13 Dani Megert CLA 2012-05-08 06:01:27 EDT
(In reply to comment #6)
> I've built and verified that the fix works on the following older versions:
> 3.4.2+
> 3.5.2+
> 3.6.2+

How did you do it?


I tested again and it looks that the fix is OK in >=3.6.2+ However, in 3.5.2+ and 3.4.2+ it only fixes case 1 of comment 0 but not case 2. Didn't test 3.6 + patch.

It looks like some additional fix from 3.6.2 and newer, is also needed.

Chris, can you take a look?
Comment 14 Dani Megert CLA 2012-05-09 07:20:55 EDT
The reason why it works >= 3.6.2 is the fix for bug 328975.
Comment 15 Dani Megert CLA 2012-05-09 07:29:57 EDT
I'm marking this one as fixed again, since the backport for this bug took place. There's nothing more to do from the 'User Assistance' side.
Comment 16 Wayne Beaton CLA 2013-04-16 13:41:21 EDT
This one's been marked fixed for a while. Can we remove the "committer-only" restriction?
Comment 17 Steve Francisco CLA 2013-05-02 10:53:44 EDT
removing the restriction seems fine - it's been over a year.
Comment 18 Dani Megert CLA 2013-05-02 11:48:47 EDT
(In reply to comment #17)
> removing the restriction seems fine - it's been over a year.

You're a bit late ;-)-
Comment 19 Steve Francisco CLA 2013-05-02 22:59:41 EDT
ha - well I retroactively approve the removal on behalf of all of my loyal subjects