Vulnerabilities > CVE-2012-1887 - Resource Management Errors vulnerability in Microsoft Excel and Office
Attack vector
NETWORK Attack complexity
MEDIUM Privileges required
NONE Confidentiality impact
COMPLETE Integrity impact
COMPLETE Availability impact
COMPLETE Summary
Use-after-free vulnerability in Microsoft Excel 2003 SP3, 2007 SP2 and SP3, and 2010 SP1, and Office 2008 and 2011 for Mac, allows remote attackers to execute arbitrary code via a crafted spreadsheet, aka "Excel SST Invalid Length Use After Free Vulnerability."
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 7 |
Common Weakness Enumeration (CWE)
Msbulletin
bulletin_id | MS12-076 |
bulletin_url | |
date | 2012-11-13T00:00:00 |
impact | Remote Code Execution |
knowledgebase_id | 2720184 |
knowledgebase_url | |
severity | Important |
title | Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution |
Nessus
NASL family MacOS X Local Security Checks NASL id MACOSX_MS12-076.NASL description The remote Mac OS X host is running a version of Microsoft Excel that is affected by the following vulnerabilities : - A heap-based buffer overflow vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1885) - A memory corruption vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1886) - A use-after-free vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1887) - A stack-based buffer overflow vulnerability exists due to the way the application handles data structures while parsing Excel files. (CVE-2012-2543) If an attacker can trick a user on the affected host into opening a specially crafted Excel file, it may be possible to leverage these issues to execute arbitrary code subject to the user last seen 2019-10-28 modified 2012-11-14 plugin id 62909 published 2012-11-14 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/62909 title MS12-076: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2720184) (Mac OS X) code #TRUSTED 71910e65e655f49259b77a27f813fbbfb5b8059b6ea541fdc5af74ee834a998d5f7c4a04867c1123cefd00d18bc003ba719619f6c29f82faacae9175ec6c4823f6416e7daeb9666efa88f588e714908fbd224598f6b3631ecf6a41fba8048575c03ac5fc9f88df89c214f786f4505ee7124d952714a233521bf21716b23f87e3148ed5a3b0151f6e2c26aceb057e7596bb958a43067f3ff8aacfbbd10006efbb3ee14fa14ab3a9b8f7d9666eb24731a6611af1c45dd2a5795d516aabc56a6ea32cc2119e8a41bdcac927cc0445df245c67edb9b18b0db4cd96493562274766c7d667ad5a5eab5f44af821055cd1a39903cf228d18baa3558be677c8e29f37b46ee089e2dbe97d3caf194e6619ab0f75b8eb0c779b0dc3b97d01ced1c60a8d5483c59bcb1781992e005acae41c2a4c0ddeea2890a6f419b732b205d58c75166e26af9c8f7063178e8d562120b0b5026fd8e325bf5837496e91c3d6bdace591dbc493a0e702b5c27a69cf299028d1b53bd450333b0a5368387c91222b3b026c5849c34ad33e85b6b5335a94ce0801fa36cd5fc84acc37a0008bcccc38fce1633ae7abf1641332c01953d1a13ac2f41633dd31808f8acaff78150bde5989e9640abaff5e03a06818e93c5addbc198d33eeb33edbf8fe89660d8a9a5630b2f87360bbfad14bf675f2c4df0ddd5a4dd50f9cd6273aeb93c16ea6256730ce598bb5bf6 # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(62909); script_version("1.13"); script_set_attribute(attribute:"plugin_modification_date", value:"2018/07/14"); script_cve_id( "CVE-2012-1885", "CVE-2012-1886", "CVE-2012-1887", "CVE-2012-2543" ); script_bugtraq_id(56425, 56426, 56430, 56431); script_xref(name:"MSFT", value:"MS12-076"); script_xref(name:"MSKB", value:"2764047"); script_xref(name:"MSKB", value:"2764048"); script_name(english:"MS12-076: Vulnerabilities in Microsoft Excel Could Allow Remote Code Execution (2720184) (Mac OS X)"); script_summary(english:"Check version of Microsoft Office"); script_set_attribute(attribute:"synopsis", value: "An application installed on the remote Mac OS X host is affected by multiple remote code execution vulnerabilities."); script_set_attribute(attribute:"description", value: "The remote Mac OS X host is running a version of Microsoft Excel that is affected by the following vulnerabilities : - A heap-based buffer overflow vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1885) - A memory corruption vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1886) - A use-after-free vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1887) - A stack-based buffer overflow vulnerability exists due to the way the application handles data structures while parsing Excel files. (CVE-2012-2543) If an attacker can trick a user on the affected host into opening a specially crafted Excel file, it may be possible to leverage these issues to execute arbitrary code subject to the user's privileges."); script_set_attribute(attribute:"see_also", value:"http://technet.microsoft.com/en-us/security/bulletin/ms12-076"); script_set_attribute(attribute:"solution", value: "Microsoft has released a set of patches for Office for Mac 2011 and Office 2008 for Mac."); 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/11/13"); script_set_attribute(attribute:"patch_publication_date", value:"2012/11/13"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/14"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2008::mac"); script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2011::mac"); script_end_attributes(); script_category(ACT_GATHER_INFO); script_family(english:"MacOS X Local Security Checks"); script_copyright(english:"This script is Copyright (C) 2012-2018 Tenable Network Security, Inc."); script_dependencies("ssh_get_info.nasl"); script_require_keys("Host/local_checks_enabled", "Host/MacOSX/Version"); exit(0); } include("audit.inc"); include("global_settings.inc"); include("misc_func.inc"); include("ssh_func.inc"); include("macosx_func.inc"); if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS) enable_ssh_wrappers(); else disable_ssh_wrappers(); if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED); os = get_kb_item("Host/MacOSX/Version"); if (!os) audit(AUDIT_OS_NOT, "Mac OS X"); # Gather version info. info = ''; installs = make_array(); prod = 'Office for Mac 2011'; path = '/Applications/Microsoft Office 2011'; plist = path + '/Office/MicrosoftComponentPlugin.framework/Versions/14/Resources/Info.plist'; cmd = 'cat \'' + plist + '\' | ' + 'grep -A 1 CFBundleShortVersionString | ' + 'tail -n 1 | ' + 'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\''; version = exec_cmd(cmd:cmd); if (version && version =~ "^[0-9]+\.") { version = chomp(version); if (version !~ "^14\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'."); installs[prod] = version; fixed_version = '14.2.5'; if (ver_compare(ver:version, fix:fixed_version, strict:FALSE) == -1) { info += '\n Product : ' + prod + '\n Path : ' + path + '\n Installed version : ' + version + '\n Fixed version : ' + fixed_version + '\n'; } } prod = 'Office 2008 for Mac'; path = '/Applications/Microsoft Office 2008'; plist = path + '/Office/MicrosoftComponentPlugin.framework/Versions/12/Resources/Info.plist'; cmd = 'cat \'' + plist + '\' | ' + 'grep -A 1 CFBundleShortVersionString | ' + 'tail -n 1 | ' + 'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\''; version = exec_cmd(cmd:cmd); if (version && version =~ "^[0-9]+\.") { version = chomp(version); if (version !~ "^12\.") exit(1, "Failed to get the version for "+prod+" - '"+version+"'."); installs[prod] = version; fixed_version = '12.3.5'; if (ver_compare(ver:version, fix:fixed_version, strict:FALSE) == -1) { info += '\n Product : ' + prod + '\n Path : ' + path + '\n Installed version : ' + version + '\n Fixed version : ' + fixed_version + '\n'; } } # Report findings. if (info) { if (report_verbosity > 0) security_hole(port:0, extra:info); else security_hole(0); exit(0); } else { if (max_index(keys(installs)) == 0) exit(0, "Office 2008 for Mac / Office for Mac 2011 is not installed."); else { msg = 'The host has '; foreach prod (sort(keys(installs))) msg += prod + ' ' + installs[prod] + ' and '; msg = substr(msg, 0, strlen(msg)-1-strlen(' and ')); msg += ' installed and thus is not affected.'; exit(0, msg); } }
NASL family Windows : Microsoft Bulletins NASL id SMB_NT_MS12-076.NASL description The remote Windows host is running a version of Microsoft Excel that is affected by the following vulnerabilities : - A heap-based buffer overflow vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1885) - A memory corruption vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1886) - A use-after-free vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1887) - A stack-based buffer overflow vulnerability exists due to the way the application handles data structures while parsing Excel files. (CVE-2012-2543) If an attacker can trick a user on the affected host into opening a specially crafted Excel file, it may be possible to leverage these issues to execute arbitrary code subject to the user last seen 2020-06-01 modified 2020-06-02 plugin id 62908 published 2012-11-14 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/62908 title MS12-076: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2720184) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(62908); script_version("1.21"); script_cvs_date("Date: 2018/11/15 20:50:31"); script_cve_id( "CVE-2012-1885", "CVE-2012-1886", "CVE-2012-1887", "CVE-2012-2543" ); script_bugtraq_id(56425, 56426, 56430, 56431); script_xref(name:"MSFT", value:"MS12-076"); script_xref(name:"MSKB", value:"2597126"); script_xref(name:"MSKB", value:"2687307"); script_xref(name:"MSKB", value:"2687311"); script_xref(name:"MSKB", value:"2687313"); script_xref(name:"MSKB", value:"2687481"); script_name(english:"MS12-076: Vulnerabilities in Microsoft Office Could Allow Remote Code Execution (2720184)"); script_summary(english:"Checks versions of Excel, Excelcnv.exe, and Xlview.exe."); script_set_attribute(attribute:"synopsis", value: "It is possible to execute arbitrary code on the remote host through Microsoft Excel."); script_set_attribute(attribute:"description", value: "The remote Windows host is running a version of Microsoft Excel that is affected by the following vulnerabilities : - A heap-based buffer overflow vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1885) - A memory corruption vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1886) - A use-after-free vulnerability exists due to the way the application handles memory when opening Excel files. (CVE-2012-1887) - A stack-based buffer overflow vulnerability exists due to the way the application handles data structures while parsing Excel files. (CVE-2012-2543) If an attacker can trick a user on the affected host into opening a specially crafted Excel file, it may be possible to leverage these issues to execute arbitrary code subject to the user's privileges."); script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-184/"); script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2012/Nov/110"); script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2012/ms12-076"); script_set_attribute(attribute:"solution", value: "Microsoft has released a set of patches for Excel 2003, 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/11/13"); script_set_attribute(attribute:"patch_publication_date", value:"2012/11/13"); script_set_attribute(attribute:"plugin_publication_date", value:"2012/11/14"); 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: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("audit.inc"); include("smb_hotfixes_fcheck.inc"); include("smb_hotfixes.inc"); include("smb_func.inc"); include("misc_func.inc"); get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible"); bulletin = "MS12-076"; kbs = make_list( "2597126", "2687307", "2687311", "2687313", "2687481" ); 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 == 1) && ( (ver[0] == 14 && ver[1] == 0 && ver[2] < 6126) || (ver[0] == 14 && ver[1] == 0 && ver[2] == 6126 && ver[3] < 5003) ) ) { vuln = TRUE; info = '\n Product : Excel 2010' + '\n File : ' + path + '\n Installed version : ' + version + '\n Fixed version : 14.0.6126.5003' + '\n'; hotfix_add_report(info, bulletin:bulletin, kb:"2597126"); } # 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] < 6665) || (ver[0] == 12 && ver[1] == 0 && ver[2] == 6665 && ver[3] < 5003) ) ) { vuln = TRUE; info = '\n Product : Excel 2007' + '\n File : ' + path + '\n Installed version : ' + version + '\n Fixed version : 12.0.6665.5003' + '\n'; hotfix_add_report(info, bulletin:bulletin, kb:"2687307"); } # 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] < 8347)) { vuln = TRUE; info = '\n Product : Excel 2003' + '\n File : ' + path + '\n Installed version : ' + version + '\n Fixed version : 11.0.8347.0' + '\n'; hotfix_add_report(info, bulletin:bulletin, kb:"2687481"); } } } ###################################################################### # Excel Viewer ###################################################################### version = ''; 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 ( # Excel Viewer 2007 SP2 == 12.0.6424.100 (ver[0] == 12 && ver[1] == 0 && ver[2] >= 6424) && ( (ver[0] == 12 && ver[1] == 0 && ver[2] < 6665) || (ver[0] == 12 && ver[1] == 0 && ver[2] == 6665 && ver[3] < 5003) ) ) { vuln = TRUE; info = '\n Product : Excel Viewer' + '\n File : ' + path + '\n Installed version : ' + version + '\n Fixed version : 12.0.6665.5003' + '\n'; hotfix_add_report(info, bulletin:bulletin, kb:"2687313"); break; } } } x86_path = hotfix_get_commonfilesdir(); x64_path = hotfix_get_programfilesdirx86(); if (!version) { # Additional check if registry key is missing kb = "2687313"; if ( (x86_path && hotfix_is_vulnerable(file:"Xlview.exe", version:"12.0.6665.5003", min_version:"12.0.0.0", path:x86_path + "\Microsoft Office\Office12", bulletin:bulletin, kb:kb)) || (x64_path && hotfix_is_vulnerable(file:"Xlview.exe", arch:"x64", version:"12.0.6665.5003", min_version:"12.0.0.0", path:x64_path + "\Microsoft Office\Office12", bulletin:bulletin, kb:kb)) ) vuln = TRUE; } ###################################################################### # Microsoft Office Compatibility Pack ###################################################################### version = ''; installs = get_kb_list("SMB/Office/ExcelCnv/*/ProductPath"); if (!isnull(installs)) { foreach install (keys(installs)) { version = install - 'SMB/Office/ExcelCnv/' - '/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]); if ( (ver[0] == 12 && ver[1] == 0 && ver[2] < 6665) || (ver[0] == 12 && ver[1] == 0 && ver[2] == 6665 && ver[3] < 5003) ) { info = '\n Product : 2007 Office system and the Office Compatibility Pack' + '\n File : '+ path + '\n Installed version : '+ version + '\n Fixed version : 12.0.6665.5003' + '\n'; hotfix_add_report(info, bulletin:bulletin, kb:"2687311"); } } } if (!version) { # Additional check if registry key is missing kb = "2687311"; if ( (x86_path && hotfix_is_vulnerable(file:"Excelcnv.exe", version:"12.0.6665.5003", min_version:"12.0.0.0", path:x86_path + "\Microsoft Office\Office12", bulletin:bulletin, kb:kb)) || (x64_path && hotfix_is_vulnerable(file:"Excelcnv.exe", arch:"x64", version:"12.0.6665.5003", min_version:"12.0.0.0", path:x64_path + "\Microsoft Office\Office12", bulletin:bulletin, kb:kb)) ) vuln = TRUE; } if (info || vuln) { set_kb_item(name:"SMB/Missing/" + bulletin, value:TRUE); hotfix_security_hole(); hotfix_check_fversion_end(); exit(0); } else { hotfix_check_fversion_end(); audit(AUDIT_HOST_NOT, "affected"); }
Oval
accepted 2012-12-31T04:01:26.248-05:00 class vulnerability contributors name SecPod Team organization SecPod Technologies definition_extensions comment Microsoft Excel 2007 SP2 is installed oval oval:org.mitre.oval:def:15538 comment Microsoft Excel 2007 SP3 is installed oval oval:org.mitre.oval:def:15126 comment Microsoft Excel 2010 SP1 is installed oval oval:org.mitre.oval:def:15308 comment Microsoft Excel 2003 SP3 is installed oval oval:org.mitre.oval:def:15771
description Use-after-free vulnerability in Microsoft Excel 2003 SP3, 2007 SP2 and SP3, and 2010 SP1, and Office 2008 and 2011 for Mac, allows remote attackers to execute arbitrary code via a crafted spreadsheet, aka "Excel SST Invalid Length Use After Free Vulnerability." family windows id oval:org.mitre.oval:def:15717 status accepted submitted 2012-11-16T09:20:22 title Excel SST Invalid Length Use After Free Vulnerability - MS12-076 version 11 accepted 2012-12-31T04:01:45.848-05:00 class vulnerability contributors name SecPod Team organization SecPod Technologies definition_extensions comment Microsoft Office 2008 for Mac is installed oval oval:org.mitre.oval:def:15839 comment Microsoft Office 2011 for Mac is installed oval oval:org.mitre.oval:def:14753
description Use-after-free vulnerability in Microsoft Excel 2003 SP3, 2007 SP2 and SP3, and 2010 SP1, and Office 2008 and 2011 for Mac, allows remote attackers to execute arbitrary code via a crafted spreadsheet, aka "Excel SST Invalid Length Use After Free Vulnerability." family macos id oval:org.mitre.oval:def:15970 status accepted submitted 2012-11-16T09:20:22 title Excel SST Invalid Length Use After Free Vulnerability - MS12-076 version 4
References
- http://www.securityfocus.com/bid/56430
- http://www.securitytracker.com/id?1027752
- http://www.us-cert.gov/cas/techalerts/TA12-318A.html
- https://docs.microsoft.com/en-us/security-updates/securitybulletins/2012/ms12-076
- https://exchange.xforce.ibmcloud.com/vulnerabilities/78074
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15717
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A15970