Outlook Remote Code Execution in Preview Pane (S/MIME)
10 Oct. 2002
The S/MIME standard attempts to raise the level of trust of email messages by enabling users to digitally sign their messages and so the receiver can verify the authenticity of the received message.
However, sometimes an added security feature can open up dangerous security hole; a security vulnerability in the way Outlook handles S/MIME certificates causes it to execute arbitrary code when inspecting a malformed S/MIME signed message.
Outlook Express version 5.50
Outlook Express version 6.0
Outlook Express 5.5 SP2
Outlook Express 6.0 SP1 (included in Windows XP SP1)
S/MIME has been implemented in Outlook Express in accordance to RFC 2311 (http://www.ietf.org/rfc/rfc2311.txt?number=2311). As the RFC states, an error message should be displayed whenever the "From" field of the letter does not match that of the S/MIME RFC822 Name (in our example it will be firstname.lastname@example.org).
The following error message will be displayed whenever such an incident occurs (The fake email address has been set to "Fake"):
There are security problems with this message.
Please review the highlighted items listed below:
(V) Message has not been tampered with
(V) You do trust the signing digital ID
(V) The digital ID has not expired
(X) The digital ID's e-mail address does not match sender's
(V) The digital ID has not been revoked or revocation information for this certificate could not be determined.
(V) There are no other problems with the digital ID
Ironically, this message warning is where the vulnerability lies. An overflow in the code that tries to place the sender's email address in the message allows arbitrary code execution, which is triggered whenever a user views the message. Watching it in the preview pane is sufficient to trigger the overflow.