<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Linked attachment feature vulnerability</title> 
  <pubDate>Fri, 10 Apr 2026 15:00:38 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/5892</link> 
  <atom:link rel="self" type="application/rss+xml" title="Linked attachment feature vulnerability" href="https://bugs.horde.org/ticket/5892/rss" /> 
  <description>Linked attachment feature vulnerability</description> 
 
   
   
  <item> 
   <title>By exploiting the jar: protocol feature of Mozilla Firefox a</title> 
   <description>By exploiting the jar: protocol feature of Mozilla Firefox and the fact that the Imp Web Client allows things like &quot;https://mail.server/horde/imp/attachment.php?u=user&amp;t=4827164921&amp;f=example.jpg&quot;, it&#039;s possible to execute various XSS attacks. For example: &quot;jar:https://mail.server/horde/imp/attachment.php?u=user&amp;t=4827164921&amp;f=example.jar!/evil.htm&quot;.</description> 
   <pubDate>Thu, 15 Nov 2007 20:55:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38645</link> 
  </item> 
   
  <item> 
   <title>&gt; By exploiting the jar: protocol feature of Mozilla Firefox</title> 
   <description>&gt; By exploiting the jar: protocol feature of Mozilla Firefox and the 

&gt; fact that the Imp Web Client allows things like 

&gt; &quot;https://mail.server/horde/imp/attachment.php?u=user&amp;t=4827164921&amp;f=example.jpg&quot;, it&#039;s possible to execute various XSS attacks. For example: 

&gt; &quot;jar:https://mail.server/horde/imp/attachment.php?u=user&amp;t=4827164921&amp;f=example.jar!/evil.htm&quot;.



I&#039;m certainly sensitive to security concerns, but there are several reasons I don&#039;t think this is a vulnerability in IMP itself, though IMP might be &quot;involved&quot; in exploiting it:



- When downloading linked attachments, we send a content-disposition of attachment. If the browser displays files directly anyway... there&#039;s only so much we can do about that.



- If I&#039;m reading correctly, you have to prepend jar: to the URL for this to happen. IMP will never do that, so someone would have to send a hand-crafted email containing the malicious URL.



- If the attacker is crafting their own URL anyway, isn&#039;t it a lot simpler to put their malicious file somewhere else, and to make it look more enticing then an email attachment? Admittedly this is a dodge, but I think the other reasons are more valid.



- A user could upload other kinds of &quot;bad&quot; content to an attachment and send them out. That makes this a file delivery mechanism - we should probably have a hook for scanning and accepting/rejecting linked attachments - but that&#039;s no more a vulnerability than an FTP site is.



If you don&#039;t disagree, I&#039;ll turn this into an enhancement ticket to add a hook for scanning linked attachments (probably easier to have it handle all attachments and accept/reject on initial upload, actually). If you do disagree, please explain, and we&#039;ll see where we are.



Thanks,

Chuck</description> 
   <pubDate>Fri, 16 Nov 2007 01:10:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38648</link> 
  </item> 
   
  <item> 
   <title>Poster wrote back clarifying that this is an XSS issue (http</title> 
   <description>Poster wrote back clarifying that this is an XSS issue (http://blog.beford.org/?p=8). I&#039;m still not sure that this is a vulnerability that we can solve in IMP.



To the poster: what is your suggested solution here? Any particular site can turn off linked attachments. But any application that hosts files is &quot;vulnerable&quot; to this. So what can an app do, aside from disallowing jar files?</description> 
   <pubDate>Fri, 16 Nov 2007 04:13:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38651</link> 
  </item> 
   
  <item> 
   <title>I guess that won&#039;t do the job either... cause it doesn&#039;t mat</title> 
   <description>I guess that won&#039;t do the job either... cause it doesn&#039;t matter the extension you use, the jar: protocol will interpret it as if it was a jar file... i think that the solution begins with &quot;hiding&quot; the original attachment. Another google example (this time a good one :P):



http://mail.google.com/mail/?attid=0.1&amp;disp=attd&amp;view=att&amp;th=1166689ac6fe384d



I&#039;m not sure, but i think that what happens in this situation, is that an internal script is run and then you have access to the desired attachment. But not directly.





&gt; Poster wrote back clarifying that this is an XSS issue 

&gt; (http://blog.beford.org/?p=8). I&#039;m still not sure that this is a 

&gt; vulnerability that we can solve in IMP.

&gt;

&gt; To the poster: what is your suggested solution here? Any particular 

&gt; site can turn off linked attachments. But any application that hosts 

&gt; files is &quot;vulnerable&quot; to this. So what can an app do, aside from 

&gt; disallowing jar files?

</description> 
   <pubDate>Fri, 16 Nov 2007 04:43:59 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38653</link> 
  </item> 
   
  <item> 
   <title>&gt; I guess that won&#039;t do the job either... cause it doesn&#039;t m</title> 
   <description>&gt; I guess that won&#039;t do the job either... cause it doesn&#039;t matter the 

&gt; extension you use, the jar: protocol will interpret it as if it was a 

&gt; jar file... i think that the solution begins with &quot;hiding&quot; the 

&gt; original attachment. Another google example (this time a good one :P):

&gt;

&gt; http://mail.google.com/mail/?attid=0.1&amp;disp=attd&amp;view=att&amp;th=1166689ac6fe384d

&gt;

&gt; I&#039;m not sure, but i think that what happens in this situation, is 

&gt; that an internal script is run and then you have access to the 

&gt; desired attachment. But not directly.



How does that help? By preventing the jar: prefix being on the URL, because you&#039;ve done a redirect? I guess that might make sense, and if that&#039;s it that&#039;s a relatively simple change...

</description> 
   <pubDate>Sat, 17 Nov 2007 06:05:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38693</link> 
  </item> 
   
  <item> 
   <title>Moving to HEAD; will have to be addressed there first no mat</title> 
   <description>Moving to HEAD; will have to be addressed there first no matter how far back any changes are backported.</description> 
   <pubDate>Sat, 17 Nov 2007 06:06:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38694</link> 
  </item> 
   
  <item> 
   <title>Well... now i&#039;ve realized that the solution i mentioned earl</title> 
   <description>Well... now i&#039;ve realized that the solution i mentioned earlier isn&#039;t possible too, cause: first the script retrives the file and next the jar: protocol acts. So.. I think that a good solution is to put a secure id in the attachment&#039;s URL, for each rcpt of the attachment. That way, no one (except the rcpt) would know the path to the file and the XSS attack won&#039;t be possible.</description> 
   <pubDate>Sat, 17 Nov 2007 17:54:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38695</link> 
  </item> 
   
  <item> 
   <title>Besides that we already have such an (pseudo) unique id, the</title> 
   <description>Besides that we already have such an (pseudo) unique id, the timestamp, how would that help? The attacker, which would be the sender, would send the message to himself anyway.</description> 
   <pubDate>Sat, 17 Nov 2007 18:22:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38702</link> 
  </item> 
   
  <item> 
   <title>What is needed is not an unique id, it&#039;s a secret and unique</title> 
   <description>What is needed is not an unique id, it&#039;s a secret and unique id.. on gmail, for example, each rcpt receives an unique and secret id in his url, including the sender. A timestamp concatenated with a pseudo-random id, or something like that may be a solution.



&gt; Besides that we already have such an (pseudo) unique id, the 

&gt; timestamp, how would that help? The attacker, which would be the 

&gt; sender, would send the message to himself anyway.

</description> 
   <pubDate>Sat, 17 Nov 2007 18:43:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38703</link> 
  </item> 
   
  <item> 
   <title>&gt; What is needed is not an unique id, it&#039;s a secret and uniq</title> 
   <description>&gt; What is needed is not an unique id, it&#039;s a secret and unique id.. on 

&gt; gmail, for example, each rcpt receives an unique and secret id in his 

&gt; url, including the sender. A timestamp concatenated with a 

&gt; pseudo-random id, or something like that may be a solution.



But the attachments are sent to email _recipients_, who don&#039;t have accounts. So how do you propose to enforce the uniqueness? The attacker could send them any valid id. Secret doesn&#039;t matter.</description> 
   <pubDate>Sat, 17 Nov 2007 18:46:26 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38706</link> 
  </item> 
   
  <item> 
   <title>The idea is that the server generate one unique id for each </title> 
   <description>The idea is that the server generate one unique id for each of the email recipients, in such a way that the recipient could only open his own attachment. Even if the attacker knows a valid id for his evil file, that id should only work with his own horde account. For the rest of the email recipients (who don&#039;t have accounts), there&#039;s no problem, cause the main problem here is that the file is located and run in the same domain of the recipient webmail account, that makes possible the attack to happen. If you have the evil script running on webmail.server1 and the victim has it&#039;s account on webmail.server2, the script won&#039;t have the right permissions to XSS the victim.

For the &quot;webmail.server1 attacker, webmail.server1 victim&quot; problem, I think that it&#039;s possible to check which attachment is &quot;visible&quot; to which account.



&gt; But the attachments are sent to email _recipients_, who don&#039;t have 

&gt; accounts. So how do you propose to enforce the uniqueness? The 

&gt; attacker could send them any valid id. Secret doesn&#039;t matter.

</description> 
   <pubDate>Sat, 17 Nov 2007 19:05:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38707</link> 
  </item> 
   
  <item> 
   <title>I guess the easier but uncool solution is to remove the &quot;Lin</title> 
   <description>I guess the easier but uncool solution is to remove the &quot;Link Attachments&quot; feature ;) but i guess you don&#039;t want that...</description> 
   <pubDate>Sat, 17 Nov 2007 20:00:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38708</link> 
  </item> 
   
  <item> 
   <title>&gt; I guess the easier but uncool solution is to remove the &quot;L</title> 
   <description>&gt; I guess the easier but uncool solution is to remove the &quot;Link 

&gt; Attachments&quot; feature ;) but i guess you don&#039;t want that...



As I said earlier, people can already disable this with a configuration option.</description> 
   <pubDate>Tue, 20 Nov 2007 21:05:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38823</link> 
  </item> 
   
  <item> 
   <title>&gt; Well... now i&#039;ve realized that the solution i mentioned ea</title> 
   <description>&gt; Well... now i&#039;ve realized that the solution i mentioned earlier isn&#039;t 

&gt; possible too, cause: first the script retrives the file and next the 

&gt; jar: protocol acts.



Even with a redirect to a different protocol in between?</description> 
   <pubDate>Tue, 20 Nov 2007 21:06:13 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38826</link> 
  </item> 
   
  <item> 
   <title>I have an alternate thought here than the secret id crazines</title> 
   <description>I have an alternate thought here than the secret id craziness, and having to determine users by id and email address, which seems really unworkable if you think about forwarding, aliases, and a bunch of other stuff. My head spins.



Isn&#039;t the simplest answer here to just add an intermediate page? Make it impossible to download a linked attachment directly - you have to go to the page first, get a token that&#039;s valid for a few minutes, make a POST request, etc., then you get the file. That way no jar: link could link directly to a file.</description> 
   <pubDate>Tue, 20 Nov 2007 21:10:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38829</link> 
  </item> 
   
  <item> 
   <title>&gt; Isn&#039;t the simplest answer here to just add an intermediate</title> 
   <description>&gt; Isn&#039;t the simplest answer here to just add an intermediate page? Make 

&gt; it impossible to download a linked attachment directly - you have to 

&gt; go to the page first, get a token that&#039;s valid for a few minutes, 

&gt; make a POST request, etc., then you get the file. That way no jar: 

&gt; link could link directly to a file.



Sounds good.</description> 
   <pubDate>Tue, 20 Nov 2007 21:18:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38832</link> 
  </item> 
   
  <item> 
   <title>&gt; Sounds good.



Agreed.</title> 
   <description>&gt; Sounds good.



Agreed.</description> 
   <pubDate>Tue, 20 Nov 2007 21:43:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38835</link> 
  </item> 
   
  <item> 
   <title>&gt; As I said earlier, people can already disable this with a </title> 
   <description>&gt; As I said earlier, people can already disable this with a configuration option.



I guess that doesn&#039;t count as an argument, cause if you are suggesting that as a good option, then, for the system&#039;s security, it shouldn&#039;t be implemented in the first place.





&gt; I have an alternate thought here than the secret id craziness, and 

&gt; having to determine users by id and email address, which seems really 

&gt; unworkable if you think about forwarding, aliases, and a bunch of 

&gt; other stuff. My head spins.

&gt;

&gt; Isn&#039;t the simplest answer here to just add an intermediate page? Make 

&gt; it impossible to download a linked attachment directly - you have to 

&gt; go to the page first, get a token that&#039;s valid for a few minutes, 

&gt; make a POST request, etc., then you get the file. That way no jar: 

&gt; link could link directly to a file.



I don&#039;t know if that &quot;secret id craziness&quot; is that crazy, cause it&#039;s how google does it; but maybe i&#039;ve expressed my self wrong. If you think that&#039;s the right solution, ok, but remember that the &quot;jar:&quot; will operate after the url is resolved, and the file retrieved.</description> 
   <pubDate>Tue, 20 Nov 2007 22:24:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38836</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Isn&#039;t the simplest answer here to just add an intermediat</title> 
   <description>&gt;&gt; Isn&#039;t the simplest answer here to just add an intermediate page? Make

&gt;&gt; it impossible to download a linked attachment directly - you have to

&gt;&gt; go to the page first, get a token that&#039;s valid for a few minutes,

&gt;&gt; make a POST request, etc., then you get the file. That way no jar:

&gt;&gt; link could link directly to a file.

&gt;

&gt; I don&#039;t know if that &quot;secret id craziness&quot; is that crazy, cause it&#039;s 

&gt; how google does it; but maybe i&#039;ve expressed my self wrong. If you 

&gt; think that&#039;s the right solution, ok, but remember that the &quot;jar:&quot; 

&gt; will operate after the url is resolved, and the file retrieved.



... which is solved by an intermediate page, if not a redirect (I didn&#039;t see an answer to that question), right?



Think about the ids for a minute. Say someone has an email address on server2 that forwards back to server1. When the attacker sends the message to the server2 address, it&#039;ll have to generate a guest id. Then the victim will read it when logged in to server1, and all we can do, maybe, is to say that you can&#039;t see this attachment, because we have no record of the email having been sent to the victim at their server1 account. The whole thing seems fragile to me.</description> 
   <pubDate>Tue, 20 Nov 2007 22:52:17 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38839</link> 
  </item> 
   
  <item> 
   <title>&gt; Think about the ids for a minute. Say someone has an email</title> 
   <description>&gt; Think about the ids for a minute. Say someone has an email address on 

&gt; server2 that forwards back to server1. When the attacker sends the 

&gt; message to the server2 address, it&#039;ll have to generate a guest id. 

&gt; Then the victim will read it when logged in to server1, and all we 

&gt; can do, maybe, is to say that you can&#039;t see this attachment, because 

&gt; we have no record of the email having been sent to the victim at 

&gt; their server1 account. The whole thing seems fragile to me.



attachment received from the attacker&#039;s email with unique_id = 10 received (not even the attacker knows that id, just the rcpt):



if the rcpt is authenticated on the server&#039;s imp system:

        if the unique_id corresponds to the logged user: success!

        else: fail!

else: success! (cause then, it wont happen any XSS attack)



Maybe that&#039;s too complicated, cause maybe i&#039;m not think well about all the problems that it raises, so, let&#039;s get back to the other solution mentioned...



&gt; ... which is solved by an intermediate page, if not a redirect (I 

&gt; didn&#039;t see an answer to that question), right?



Well, i have to say that when you adopted my &quot;redirect&quot; suggestion, i didn&#039;t thought that it was a bit modified, cause, my google&#039;s previous example (when i explained my redirection idea) won&#039;t work on this situation, but i think that a solution with an intermediate page, as you said, it&#039;s ok.

</description> 
   <pubDate>Tue, 20 Nov 2007 23:17:44 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38840</link> 
  </item> 
   
  <item> 
   <title>It looks like the Mozilla folks at least accepted that this </title> 
   <description>It looks like the Mozilla folks at least accepted that this is their own bug:

http://blog.mozilla.com/security/2007/11/16/jar-protocol-xss-security-issues/



We should wait for their final measures to deal with that problem and then reconsider if we still need to add some additional protection.</description> 
   <pubDate>Wed, 21 Nov 2007 12:23:33 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t38851</link> 
  </item> 
   
  <item> 
   <title>&gt; We should wait for their final measures to deal with that </title> 
   <description>&gt; We should wait for their final measures to deal with that problem and 

&gt; then reconsider if we still need to add some additional protection.



Fixed in FF 2.0.0.10:

http://www.mozilla.org/security/announce/2007/mfsa2007-37.html</description> 
   <pubDate>Tue, 27 Nov 2007 19:44:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t39095</link> 
  </item> 
   
  <item> 
   <title>Seems to me like we should make sure not to send those parti</title> 
   <description>Seems to me like we should make sure not to send those particular mime types, and otherwise this should be okay now.</description> 
   <pubDate>Tue, 27 Nov 2007 22:20:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t39098</link> 
  </item> 
   
  <item> 
   <title>Done.

http://lists.horde.org/archives/cvs/Week-of-Mon-20071</title> 
   <description>Done.

http://lists.horde.org/archives/cvs/Week-of-Mon-20071203/072892.html</description> 
   <pubDate>Tue, 04 Dec 2007 08:23:10 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t39329</link> 
  </item> 
   
  <item> 
   <title>Wow, just found out about this exploit. Limited employees at</title> 
   <description>Wow, just found out about this exploit. Limited employees at our company have mail, however, they can store files in their accounts and give out URL&#039;s to all employees allowing access to pictures, documents and other.  All of this sharing was going on &quot;under the radar&quot;  - have not tried yet to see if this is where they are storing MP3&#039;s -  So much for being able to control access !</description> 
   <pubDate>Tue, 22 Jun 2010 11:00:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/5892#t59197</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
