Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 283232 - [security] Persistent XSS via test case upload/Same domain upload issue
Summary: [security] Persistent XSS via test case upload/Same domain upload issue
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: Bugzilla (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Eclipse Webmaster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 428255 571739 573145 (view as bug list)
Depends on: 244441
Blocks:
  Show dependency tree
 
Reported: 2009-07-11 21:26 EDT by Mario Heiderich CLA
Modified: 2021-04-26 10:08 EDT (History)
5 users (show)

See Also:


Attachments
test file (40 bytes, text/html)
2009-07-11 21:26 EDT, Mario Heiderich CLA
no flags Details
"><img src=x onerror=alert(document.cookie)> (40 bytes, text/html)
2009-07-11 21:29 EDT, Mario Heiderich CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Heiderich CLA 2009-07-11 21:26:31 EDT
Created attachment 141365 [details]
test file

Build ID: N/A

Steps To Reproduce:
1.Click on attached file
2.See cookie alert
3.Wonder


More information:
Comment 1 Mario Heiderich CLA 2009-07-11 21:29:19 EDT
Created attachment 141366 [details]
"><img src=x onerror=alert(document.cookie)>
Comment 2 Mario Heiderich CLA 2009-07-11 21:30:17 EDT
Comment on attachment 141366 [details]
"><img src=x onerror=alert(document.cookie)>

"><img src=x onerror=alert(document.cookie)>.html
Comment 3 Mario Heiderich CLA 2009-07-11 21:31:16 EDT
Comment on attachment 141366 [details]
"><img src=x onerror=alert(document.cookie)>

Does not execute the code w/o user interaction as suspected.
Comment 4 Mario Heiderich CLA 2009-07-11 21:36:24 EDT
Just for the record - uploaded file is being stored on the same subdomain as bugzilla itself. This enables stealing logged in users account by tricking them to click on the infected attachment. Maliciously crafted filenames seem no to work - as the now obsoleted other attachment showed.
Comment 5 Denis Roy CLA 2009-07-12 08:16:49 EDT
This was fixed in Bugzilla 3.2 I believe.  We're running 3.0.x and will be upgrading soon.
Comment 6 Denis Roy CLA 2009-07-12 17:26:04 EDT
Let's close this bug so no one gets any bad ideas.
Comment 7 Wayne Beaton CLA 2012-01-13 12:01:46 EST
Is it time to close this bug and take off the committer-only tag? (I think so).

Is this a bug that we need to disclose i.e. do we need to put the security keyword so that it is disclosed on the /security page?
Comment 8 Denis Roy CLA 2012-01-17 09:04:11 EST
> Is it time to close this bug and take off the committer-only tag? (I think so).
> 
> Is this a bug that we need to disclose i.e. do we need to put the security
> keyword so that it is disclosed on the /security page?

This is a security issue with Bugzilla.. and although it's fixed in the software, we have not implemented the fix here on bugs.eclipse.org since  implementing the fix means we need to reconfigure Bugzilla and DNS and all that fun stuff.
Comment 9 Wayne Beaton CLA 2012-02-05 13:32:19 EST
(In reply to comment #8)
> > Is it time to close this bug and take off the committer-only tag? (I think so).
> > 
> > Is this a bug that we need to disclose i.e. do we need to put the security
> > keyword so that it is disclosed on the /security page?
> 
> This is a security issue with Bugzilla.. and although it's fixed in the
> software, we have not implemented the fix here on bugs.eclipse.org since 
> implementing the fix means we need to reconfigure Bugzilla and DNS and all that
> fun stuff.

Any thoughts about timing for a fix?
Comment 10 Denis Roy CLA 2014-02-17 08:53:45 EST
*** Bug 428255 has been marked as a duplicate of this bug. ***
Comment 11 Christopher Guindon CLA 2021-03-05 16:41:00 EST
*** Bug 571739 has been marked as a duplicate of this bug. ***
Comment 12 Christopher Guindon CLA 2021-03-05 16:42:59 EST
I reported the same issue today without being aware of this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=571739
Comment 13 Christopher Guindon CLA 2021-03-08 13:48:05 EST
I did a bit of research here and the recommended solution from the Mozilla team is to host attachments on a separate domain:
https://bugzilla.mozilla.org/show_bug.cgi?id=1112504#c1

Attachments listed on https://bugzilla.mozilla.org/show_bug.cgi?id=1464611 are hosted on bmoattachments.org:
https://bug1464611.bmoattachments.org/attachment.cgi?id=8981058
Comment 14 Denis Roy CLA 2021-03-08 14:29:57 EST
I created a.bugs.eclipse.org a long time ago for this bug but never got any further.  Since a separate domain would be much better, I've acquired eclipsecontent.org.
Comment 15 Denis Roy CLA 2021-03-16 15:55:01 EDT
Patches pending for this.
Comment 16 Denis Roy CLA 2021-03-18 15:53:52 EDT
Bugzilla attachments are now hosted on the bugzillaattachments.eclipsecontent.org domain, per the Bugzilla docs.  Closing Fixed.
Comment 17 Christopher Guindon CLA 2021-03-18 16:50:44 EDT
(In reply to Denis Roy from comment #16)
> Bugzilla attachments are now hosted on the
> bugzillaattachments.eclipsecontent.org domain, per the Bugzilla docs. 
> Closing Fixed.

This is great! Thanks Denis!
Comment 18 Denis Roy CLA 2021-03-19 09:30:47 EDT
> This is great! Thanks Denis!

12 years, not bad eh?
Comment 19 Eclipse Webmaster CLA 2021-04-26 10:08:44 EDT
*** Bug 573145 has been marked as a duplicate of this bug. ***