Vulnerabilities > CVE-2012-0185 - Permissions, Privileges, and Access Controls vulnerability in Microsoft Excel, Excel Viewer and Office Compatibility Pack

047910
CVSS 9.3 - CRITICAL
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
microsoft
CWE-264
critical
nessus

Summary

Heap-based buffer overflow in Microsoft Excel 2007 SP2 and SP3 and 2010 Gold and SP1, Excel Viewer, and Office Compatibility Pack SP2 and SP3 allows remote attackers to execute arbitrary code via a crafted spreadsheet that triggers incorrect handling of memory during opening, aka "Excel MergeCells Record Heap Overflow Vulnerability."

Vulnerable Configurations

Part Description Count
Application
Microsoft
7

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Blue Boxing
    This type of attack against older telephone switches and trunks has been around for decades. A tone is sent by an adversary to impersonate a supervisor signal which has the effect of rerouting or usurping command of the line. While the US infrastructure proper may not contain widespread vulnerabilities to this type of attack, many companies are connected globally through call centers and business process outsourcing. These international systems may be operated in countries which have not upgraded Telco infrastructure and so are vulnerable to Blue boxing. Blue boxing is a result of failure on the part of the system to enforce strong authorization for administrative functions. While the infrastructure is different than standard current applications like web applications, there are historical lessons to be learned to upgrade the access control for administrative functions.
  • Restful Privilege Elevation
    Rest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the server side. The attacker identifies a HTTP Get URL such as http://victimsite/updateOrder, which calls out to a program to update orders on a database or other resource. The URL is not idempotent so the request can be submitted multiple times by the attacker, additionally, the attacker may be able to exploit the URL published as a Get method that actually performs updates (instead of merely retrieving data). This may result in malicious or inadvertent altering of data on the server.
  • Target Programs with Elevated Privileges
    This attack targets programs running with elevated privileges. The attacker would try to leverage a bug in the running program and get arbitrary code to execute with elevated privileges. For instance an attacker would look for programs that write to the system directories or registry keys (such as HKLM, which stores a number of critical Windows environment variables). These programs are typically running with elevated privileges and have usually not been designed with security in mind. Such programs are excellent exploit targets because they yield lots of power when they break. The malicious user try to execute its code at the same level as a privileged system call.

Msbulletin

bulletin_idMS12-030
bulletin_url
date2012-05-08T00:00:00
impactRemote Code Execution
knowledgebase_id2663830
knowledgebase_url
severityImportant
titleVulnerabilities in Microsoft Office Could Allow Remote Code Execution

Nessus

NASL familyWindows : Microsoft Bulletins
NASL idSMB_NT_MS12-030.NASL
descriptionThe remote Windows host is running a version of Microsoft Office, Excel, or a related product that is affected by several vulnerabilities. If an attacker can trick a user on the affected host into opening a specially crafted Excel file, they could leverage these issues to execute arbitrary code subject to the user
last seen2020-06-01
modified2020-06-02
plugin id59038
published2012-05-09
reporterThis script is Copyright (C) 2012-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/59038
titleMS12-030: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2663830)
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(59038);
  script_version("1.22");
  script_cvs_date("Date: 2018/11/15 20:50:31");

  script_cve_id(
    "CVE-2012-0184",
    "CVE-2012-0185",
    "CVE-2012-0141",
    "CVE-2012-0142",
    "CVE-2012-0143",
    "CVE-2012-1847"
  );
  script_bugtraq_id(
    53342,
    53373,
    53374,
    53375,
    53376,
    53379
  );
  script_xref(name:"MSFT", value:"MS12-030");
  script_xref(name:"MSKB", value:"2553371");
  script_xref(name:"MSKB", value:"2596842");
  script_xref(name:"MSKB", value:"2597086");
  script_xref(name:"MSKB", value:"2597161");
  script_xref(name:"MSKB", value:"2597162");
  script_xref(name:"MSKB", value:"2597166");
  script_xref(name:"MSKB", value:"2597969");

  script_name(english:"MS12-030: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2663830)");
  script_summary(english:"Checks versions of Excel and xl12cnv.exe.");

  script_set_attribute(attribute:"synopsis", value:
"Arbitrary code can be executed on the remote host through Microsoft
Office.");
  script_set_attribute(attribute:"description", value:
"The remote Windows host is running a version of Microsoft Office,
Excel, or a related product that is affected by several
vulnerabilities.

If an attacker can trick a user on the affected host into opening a
specially crafted Excel file, they could leverage these issues to
execute arbitrary code subject to the user's privileges.");
  script_set_attribute(attribute:"see_also", value:"http://www.zerodayinitiative.com/advisories/ZDI-12-157/");
  script_set_attribute(attribute:"see_also", value:"http://seclists.org/fulldisclosure/2012/Aug/279");
  script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2012/ms12-030");
  script_set_attribute(attribute:"solution", value:
"Microsoft has released a set of patches for Excel 2003, 2007, 2010,
Office 2007, 2010, Excel Viewer, and Office Compatibility Pack.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_malware", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/05/08");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/05/08");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/05/09");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:excel_viewer");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office_compatibility_pack");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Windows : Microsoft Bulletins");

  script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc.");

  script_dependencies("office_installed.nasl", "smb_hotfixes.nasl", "ms_bulletin_checks_possible.nasl");
  script_require_keys("SMB/MS_Bulletin_Checks/Possible");
  script_require_ports(139, 445, "Host/patch_management_checks");

  exit(0);
}

include("smb_hotfixes_fcheck.inc");
include("smb_hotfixes.inc");
include("smb_func.inc");
include("misc_func.inc");
include("audit.inc");

get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");

bulletin = "MS12-030";
kbs = make_list(
  "2553371", "2596842", "2597086", "2597161",
  "2597162", "2597166", "2597969"
);

if (get_kb_item("Host/patch_management_checks"))
  hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);

info = "";
vuln = FALSE;

######################################################################
# Excel
######################################################################
installs = get_kb_list("SMB/Office/Excel/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/Excel/' - '/ProductPath';
    path = installs[install];
    if (isnull(path)) path = "n/a";

    ver = split(version, sep:".", keep:FALSE);
    for (i = 0; i < max_index(ver); i++)
      ver[i] = int(ver[i]);

    # Excel 2010.
    office_sp = get_kb_item("SMB/Office/2010/SP");
    if (
      (!isnull(office_sp) && (office_sp == 0 || office_sp == 1)) &&
      (
        (ver[0] == 14 && ver[1] == 0 && ver[2] < 6117) ||
        (ver[0] == 14 && ver[1] == 0 && ver[2] == 6117 && ver[3] < 5003)
      )
    )
    {
      vuln = TRUE;
      info =
        '\n  Product           : Excel 2010' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 14.0.6117.5003' +
        '\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2597166");
    }

    # Excel 2007.
    office_sp = get_kb_item("SMB/Office/2007/SP");
    if (
      (!isnull(office_sp) && (office_sp == 2 || office_sp == 3)) &&
      (
        (ver[0] == 12 && ver[1] == 0 && ver[2] < 6661) ||
        (ver[0] == 12 && ver[1] == 0 && ver[2] == 6661 && ver[3] < 5000)
      )
    )
    {
      vuln = TRUE;
      info =
        '\n  Product           : Excel 2007' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 12.0.6661.5000' +
        '\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2597161");
    }

    # Excel 2003.
    office_sp = get_kb_item("SMB/Office/2003/SP");
    if ((!isnull(office_sp) && office_sp == 3) && (ver[0] == 11 && ver[1] == 0 && ver[2] < 8346))
    {
      vuln = TRUE;
      info =
        '\n  Product           : Excel 2003' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 11.0.8346.0' +
        '\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2597086");
    }
  }
}

######################################################################
# Excel Viewer
######################################################################
installs = get_kb_list("SMB/Office/ExcelViewer/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/ExcelViewer/' - '/ProductPath';
    path = installs[install];
    if (isnull(path)) path = "n/a";

    ver = split(version, sep:".", keep:FALSE);
    for (i = 0; i < max_index(ver); i++)
      ver[i] = int(ver[i]);

    # Excel Viewer.
    if (
      (ver[0] == 12 && ver[1] == 0 && ver[2] >= 6424) &&
      (
        (ver[0] == 12 && ver[1] == 0 && ver[2] < 6658) ||
        (ver[0] == 12 && ver[1] == 0 && ver[2] == 6658 && ver[3] < 5004)
      )
    )
    {
      vuln = TRUE;
      info =
        '\n  Product           : Excel Viewer' +
        '\n  File              : ' + path +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : 12.0.6658.5004' +
        '\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2596842");
      break;
    }
  }
}

######################################################################
# Microsoft Office Compatibility Pack
######################################################################
installs = get_kb_list("SMB/Office/ExcelCnv/*/ProductPath");
if (!isnull(installs))
{
  foreach install (keys(installs))
  {
    version = install - 'SMB/Office/ExcelCnv/' - '/ProductPath';
    path = installs[path];
    if (isnull(path)) path = "n/a";

    ver = split(version, sep:".", keep:FALSE);
    for (i = 0; i < max_index(ver); i++)
      ver[i] = int(ver[i]);

    if (
      (ver[0] == 12 && ver[1] == 0 && ver[2] < 6661) ||
      (ver[0] == 12 && ver[1] == 0 && ver[2] == 6661 && ver[3] < 5000)
    )
    {
      vuln = TRUE;
      info =
        '\n  Product           : 2007 Office system and the Office Compatibility Pack' +
        '\n  File              : '+ path +
        '\n  Installed version : '+ version +
        '\n  Fixed version     : 12.0.6661.5000' +
        '\n';
      hotfix_add_report(info, bulletin:bulletin, kb:"2597162");
      break;
    }
  }
}

######################################################################
# Office
######################################################################
office_vers = hotfix_check_office_version();
x86_path = hotfix_get_commonfilesdir();
x64_path = hotfix_get_programfilesdirx86();

# Office 2010 SP0 and SP1.
if (office_vers["14.0"])
{
  office_sp = get_kb_item("SMB/Office/2010/SP");
  if (!isnull(office_sp) && office_sp <= 1)
  {
    kb = "2553371";
    if (
      (x86_path && hotfix_is_vulnerable(file:"Graph.exe", version:"14.0.6117.5003", min_version:"14.0.0.0", path:x86_path + "\Microsoft Shared\Office14", bulletin:bulletin, kb:kb)) ||
      (x64_path && hotfix_is_vulnerable(file:"Graph.exe", arch:"x64", version:"14.0.6117.5003", min_version:"14.0.0.0", path:x64_path + "\Common Files\Microsoft Shared\Office14", bulletin:bulletin, kb:kb))
    ) vuln = TRUE;
  }
}
# Office 2007 SP2 and SP3.
if (office_vers["12.0"])
{
  office_sp = get_kb_item("SMB/Office/2007/SP");
  if (!isnull(office_sp) && (office_sp == 2 || office_sp == 3))
  {
    kb = "2597969";
    if (
      (x86_path && hotfix_is_vulnerable(file:"Graph.exe", version:"12.0.6658.5004", min_version:"12.0.0.0", path:x86_path + "\Microsoft Shared\Office12", bulletin:bulletin, kb:kb)) ||
      (x64_path && hotfix_is_vulnerable(file:"Graph.exe", arch:"x64", version:"12.0.6658.5004", min_version:"12.0.0.0", path:x64_path + "\Common Files\Microsoft Shared\Office12", bulletin:bulletin, kb:kb))
    ) vuln = TRUE;
  }
}
hotfix_check_fversion_end();
if (vuln)
{
  set_kb_item(name:"SMB/Missing/" + bulletin, value:TRUE);
  hotfix_security_hole();
}
else audit(AUDIT_HOST_NOT, 'affected');

Oval

accepted2014-06-30T04:05:08.754-04:00
classvulnerability
contributors
  • nameJosh Turpin
    organizationSymantec Corporation
  • nameMaria Kedovskaya
    organizationALTX-SOFT
  • nameMaria Mikhno
    organizationALTX-SOFT
  • nameMaria Mikhno
    organizationALTX-SOFT
definition_extensions
  • commentMicrosoft Excel 2007 is installed
    ovaloval:org.mitre.oval:def:1745
  • commentMicrosoft Excel 2010 is installed
    ovaloval:org.mitre.oval:def:12658
  • commentMicrosoft Office 2007 SP2 is installed
    ovaloval:org.mitre.oval:def:15607
  • commentMicrosoft Office 2007 SP3 is installed
    ovaloval:org.mitre.oval:def:15704
  • commentMicrosoft Office 2010 is installed
    ovaloval:org.mitre.oval:def:12061
  • commentMicrosoft Excel Viewer 2007 is installed
    ovaloval:org.mitre.oval:def:6006
  • commentMicrosoft Office Compatibility Pack is installed
    ovaloval:org.mitre.oval:def:1853
descriptionHeap-based buffer overflow in Microsoft Excel 2007 SP2 and SP3 and 2010 Gold and SP1, Excel Viewer, and Office Compatibility Pack SP2 and SP3 allows remote attackers to execute arbitrary code via a crafted spreadsheet that triggers incorrect handling of memory during opening, aka "Excel MergeCells Record Heap Overflow Vulnerability."
familywindows
idoval:org.mitre.oval:def:14738
statusaccepted
submitted2012-05-08T13:00:00
titleExcel MergeCells Record Heap Overflow Vulnerability
version28