Unchecked Buffer in Windows Help Facility Could Enable Code Execution (Q323255)
Originally posted: October 02, 2002
Who should read this bulletin: Customers using Microsoft® Windows® 98, Windows Me, Windows NT® 4.0, Windows 2000, or Windows XP.
Impact of vulnerability: Attacker could gain control over user's system.
Maximum Severity Rating: Critical
Recommendation: Customers should install the patch immediately.
- Microsoft Windows 98
- Microsoft Windows 98 Second Edition
- Microsoft Windows Millennium Edition
- Microsoft Windows NT 4.0
- Microsoft Windows NT 4.0, Terminal Server Edition
- Microsoft Windows 2000
- Microsoft Windows XP
The HTML Help facility in Windows includes an ActiveX control that provides much of its functionality. One of the functions exposed via the control contains an unchecked buffer, which could be exploited by a web page hosted on an attacker's site or sent to a user as an HTML mail. An attacker who successfully exploited the vulnerability would be able to run code in the security context of the user, thereby gaining the same privileges as the user on the system.
A second vulnerability exists because of flaws associated with the handling of compiled HTML Help (.chm) files that contain shortcuts. Because shortcuts allow HTML Help files to take any desired action on the system, only trusted HTML Help files should be allowed to use them. Two flaws allow this restriction to be bypassed. First, the HTML Help facility incorrectly determines the Security Zone in the case where a web page or HTML mail delivers a .chm file to the Temporary Internet Files folder and subsequently opens it. Instead of handling the .chm file in the correct zone - the one associated with the web page or HTML mail that delivered it - the HTML Help facility incorrectly handles it in the Local Computer Zone, thereby considering it trusted and allowing it to use shortcuts. This error is compounded by the fact that the HTML Help facility doesn't consider what folder the content resides in. Were it to do so, it could recover from the first flaw, as content within the Temporary Internet Folder is clearly not trusted, regardless of the Security Zone it renders in.
The attack scenario for this vulnerability would be complex, and involves using an HTML mail to deliver a .chm file that contains a shortcut, then making use of the flaws to open it and allow the shortcut to execute. The shortcut would be able to perform any action the user had privileges to perform on the system.
Before deploying the patch, customers should familiarize themselves with the caveats discussed in the FAQ and in the Caveats section below.
Buffer Overrun in HTML Help ActiveX Control:
- The HTML mail-based attack vector could not be exploited on systems where Outlook 98 or Outlook 2000 were used in conjunction with the Outlook Email Security Update, or Outlook Express 6 or Outlook 2002 were used in their default configurations.
- The vulnerability would convey only the user's privileges on the system. Users whose accounts are configured to have few privileges on the system would be at less risk than ones who operate with administrative privileges.Code Execution via Compiled HTML Help File:
- The vulnerability could not be exploited via a web site.
- The vulnerability could only be exploited if the attacker were able to determine the exact location of the Temporary Internet Files folder. By design, this should not be possible, and Microsoft is unaware of any means for doing so which has not already been patched.
- The vulnerability would convey only the user's privileges on the system. Users whose accounts are configured to have few privileges on the system would be at less risk than ones who operate with administrative privileges.
- Buffer Overrun in HTML Help ActiveX Control: CAN-2002-0693
- Code Execution via Compiled HTML Help File: CAN-2002-0694