6.0.0-RC7
6/18/26

[#8715] XSS vulnerability
Summary XSS vulnerability
Queue IMP
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 3. High
Owners Horde Developers (at) , slusarz (at) horde (dot) org
Requester slusarz (at) horde (dot) org
Created 11/18/09 (6056 days ago)
Due
Updated 5/4/10 (5889 days ago)
Assigned 4/21/10 (5902 days ago)
Resolved 5/4/10 (5889 days ago)
Github Issue Link
Github Pull Request
Milestone 4.3.6
Patch No

History
181 Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
45 acmpires (at) co (dot) sapo (dot) pt Comment #14
New Attachment: xss_8715_v2.diff Download
Reply to this comment
Hi,

Attached a patch in case the link has two hrefs with data URLs
This patch is not working for all cases, but this new version of the 
patch it's working, at least for me.
414 acmpires (at) co (dot) sapo (dot) pt Comment #13
New Attachment: xss_8715.diff Download
Reply to this comment
Hi,

Attached a patch in case the link has two hrefs with data URLs
256 Michael Slusarz State ⇒ Resolved
 
712 Michael Slusarz Comment #9 Reply to this comment
I don't have a better suggestion for you, so I just leave the 
comment that blacklisting can be dangerous.
Of course attempting to blacklist HTML attributes/elements to fix all 
security issues is dangerous.  That is why we disable HTML inline 
viewing by default.  But a large portion of users want/need this 
inline display and are willing to view these parts even with the 
understanding that the filtering may not be 100% accurate.

That being said, thanks for your examples.  It is clear that we need 
to filter *any* data information contained in the href parameter.

I'm going to go ahead and add this to git and CVS FW_3.  Will leave 
this ticket open for a few days for additional feedback.
451 david (dot) a (dot) julio (at) gmail (dot) com Comment #8 Reply to this comment
Don't forget about other content types. For example, if the data is 
the base64 encoding of:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <!--a75c305b1c0a6022--><title>Test</title>
   </head>
   <body>
     <script type="text/javascript">alert(document.cookie)</script>
   </body>
</html>

Then, the attacker can also use a link with the following URI:

data:application/xhtml+xml;base64,<encoding of above>

And this is not the only one. If the use the content types text/xml or 
application/xml, the page will be parsed as a xml document. In the 
script, document has now type XMLDocument, and doesn't have the 
property cookie. We can still write something like:

<script type="text/javascript">
if (undefined === document.cookie)
   window.location.replace(window.location.href.replace("text/xml", 
"application/xhtml+xml"))
else
   alert(document.cookie)
</script>
The same for application/xml, or more elaborate code to take care of 
various cases.

I just tested this four cases, text/html, text/xml, application/xml, 
application/xhtml+xml and I don't know if there are others.

I don't have a better suggestion for you, so I just leave the comment 
that blacklisting can be dangerous.

Thank you for your time.
Attachments are not private anyway. :)

Your patch seems to do its job, attached is a test case.

I'm not sure how far Firefox can be tricked to consider a link as a 
data scheme. I'm thinking of variants of "data:text/html".
3711 Jan Schneider Comment #7
New Attachment: 0001-Add-test.patch Download
Reply to this comment
Attachments are not private anyway. :)

Your patch seems to do its job, attached is a test case.

I'm not sure how far Firefox can be tricked to consider a link as a 
data scheme. I'm thinking of variants of "data:text/html".
165 Michael Slusarz Comment #6 (Private)
New Attachment: 0002-Bug-8715-Fix-XSS-vulnerability[1].patch Download
[Hidden]
505 Michael Slusarz Deleted Original Message
 
355 Michael Slusarz Comment #5
State ⇒ Feedback
New Attachment: 0002-Bug-8715-Fix-XSS-vulnerability.patch
Reply to this comment
How about this?
107 Michael Slusarz Comment #4 (Private)
[Hidden]
129 Jan Schneider Comment #3 (Private)
[Hidden]
229 Jan Schneider Version ⇒ FRAMEWORK_3
 
126 Michael Slusarz Comment #2 (Private)
New Attachment: Message Source.eml Download
Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
Milestone ⇒ 4.3.6
[Hidden]
286 Michael Slusarz Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ XSS vulnerability
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
.

Saved Queries