Public Vulnerability Reports

Multiple Vendor Microsoft ATL/MFC ActiveX Type Confusion Vulnerability



Microsoft's Component Object Model (COM) was designed to allow interoperability between disjointed software components. It is a standardized interface solution to the programming dilemmas involved in object oriented programming, distributed transactions, and inter-language communications. COM is involved at some level in DDE, OLE, COM+, ActiveX, and DCOM. COM objects can be embedded in various document formats, Web Pages, and various other media technologies. Microsoft's Active Template Library (ATL) is a set of C++ templates that simplify developing COM objects. More information on COM and ATL can be found at the following URLs.


Remote exploitation of a type confusion vulnerability in Microsoft Corp.'s ATL/MFC ActiveX code as included in various vendors' ActiveX controls, could allow an attacker to execute arbitrary code within Internet Explorer (IE).

One aspect of COM is a process called initialization. This process allows a program to load and store a COM object within various containers, such as OLE compound storage files and raw streams.

Depending upon certain characteristics of an OLE component designed with certain versions of the Microsoft ATL, it is possible to cause an object to use a variant of type VT_BSTR as a different object. In certain circumstances, an encoded BSTR can cause ATL code to set the COM type without checking to see if the type was successfully coerced. Upon return, the BSTR is treated as an object leading to an attacker being able to specify an address to call.


Exploitation of this vulnerability will result in the execution of arbitrary code. Attack vectors include Internet Explorer, WordPad, Microsoft Office, and any other program that loads arbitrary persistence data.


iDefense has confirmed the existence of this vulnerability inside Microsoft' ATL and MFC. This vulnerability appears to be limited to MFC version 3.0. Any source code compiled with these libraries may also be vulnerable.


iDefense is currently unaware of any workarounds for this issue.


Microsoft has released a security bulletin which addresses this issue. For more information, consult their advisory at the following URL:


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2009-2494 to this issue. This is a candidate for inclusion in the CVE list (, which standardizes names for security problems.


12/05/2008 Initial Contact
01/05/2009 Microsoft requested PoC
01/06/2009 iDefense sent PoC
01/23/2009 iDefense requested status update
01/26/2009 iDefense requested status update
01/27/2009 Microsoft reports status
02/09/2009 Microsoft reports status
02/26/2009 Microsoft reports status
03/27/2009 Microsoft reports status
04/23/2009 Microsoft reports status, predicts September release
05/13/2009 Microsoft reports status, predicts October release
05/21/2009 Microsoft requests conference call
06/03/2009 Conference call takes place
07/29/2009 Material presented at BlackHat USA
08/11/2009 Public disclosure via MS09-037


This vulnerability was discovered by Ryan Smith of iDefense Labs.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright © 2009 Verisign, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please e-mail customer service for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.