Public Vulnerability Reports

Microsoft Excel MergeCells Record Heap Overflow Vulnerability

05.08.12

BACKGROUND

Microsoft Excel is the spreadsheet application within Microsoft Office.

DESCRIPTION

Remote exploitation of a heap overflow vulnerability in Microsoft Corp.'s Excel could allow an attacker to execute arbitrary code with the privileges of the current user. The vulnerability is a logic error that leads to a heap overflow. By specifying a large 'colLast' value, it is possible to trigger a heap overflow. The result is a memory corruption starting beyond the ends of the allocated buffer, and copying back to the front of the buffer.

ANALYSIS

Exploitation of this vulnerability results in the execution of arbitrary code with the privileges of the user opening the file. To exploit this vulnerability, an attacker needs to convince a user to open a malicious file. Attackers typically accomplish this by e-mailing a targeted user the file or hosting the file on a Web page. Note that attackers cannot exploit Office file format vulnerabilities in a drive-by manner; at a minimum, a targeted user must click an "open" dialog or choose to view an attachment.

With Office 2010 (and with a backported patch to 2007 and 2003), Microsoft introduced the Office File Validation (OFV) plug-in for Office applications. This plug-in is used to scan a file before opening it, looking for record values that do not match sane values (which may indicate the file is attempting to exploit a vulnerability). If an errant record is detected, the user is warned (2003, 2007) or the file is opened in a sandboxed environment (2010). Attempts to exploit this vulnerability will result in an OFV failure, which will open the file in a sandbox, or display an error dialog.

DETECTION

The following Microsoft products are vulnerable:

  • Microsoft Excel 2003 SP 3
  • Microsoft Excel 2007 SP 2
  • Microsoft Office 2007 SP 2
  • Microsoft Excel 2007 SP 3
  • Microsoft Office 2007 SP 3
  • Microsoft Excel 2010 (32-bit editions)
  • Microsoft Office 2010 (32-bit editions)
  • Microsoft Excel 2010 SP 1 (32-bit editions)
  • Microsoft Office 2010 SP 1 (32-bit editions)
  • Microsoft Excel 2010 (64-bit editions)
  • Microsoft Office 2010 (64-bit editions)
  • Microsoft Excel 2010 SP 1 (64-bit editions)
  • Microsoft Office 2010 SP 1 (64-bit editions)
  • Microsoft Office 2008 for Mac
  • Microsoft Office for Mac 2011
  • Microsoft Excel Viewer
  • Microsoft Office Compatibility Pack SP 2
  • Microsoft Office Compatibility Pack SP 3

WORKAROUND

The vulnerability occurs in the core parsing code of Excel and this code cannot be disabled; however, it is possible to disable the opening of the older binary format files and use MOICE to convert the file to the newer XML-based format. Information about these workarounds is available in the Microsoft bulletin below.

VENDOR RESPONSE

Microsoft Corp. has addressed this vulnerability with the release of updates to Excel. More information can be found at the following URL:

http://technet.microsoft.com/en-us/security/bulletin/ms12-030

CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2012-0185 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org/), which standardizes names for security problems.

DISCLOSURE TIMELINE

12/21/2011 Initial Vendor Notification
12/21/2011 Initial Vendor Reply
05/08/2012 Coordinated Public Disclosure

CREDIT

Sean Larsson and Jun Mao of iDefense Labs reported this vulnerability.

Get paid for vulnerability research
http://labs.idefense.com/methodology/vulnerability/vcp.php

Free tools, research and upcoming events
http://labs.idefense.com/

LEGAL NOTICES

Copyright © 2012 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.