Vulnerabilities > CVE-2013-1331 - Classic Buffer Overflow vulnerability in Microsoft Office 2003/2011

047910
CVSS 7.8 - HIGH
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
local
low complexity
microsoft
CWE-120
nessus

Summary

Buffer overflow in Microsoft Office 2003 SP3 and Office 2011 for Mac allows remote attackers to execute arbitrary code via crafted PNG data in an Office document, leading to improper memory allocation, aka "Office Buffer Overflow Vulnerability."

Vulnerable Configurations

Part Description Count
Application
Microsoft
2

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Msbulletin

bulletin_idMS13-051
bulletin_url
date2013-06-11T00:00:00
impactRemote Code Execution
knowledgebase_id2839571
knowledgebase_url
severityImportant
titleVulnerability in Microsoft Office Could Allow Remote Code Execution

Nessus

  • NASL familyWindows : Microsoft Bulletins
    NASL idSMB_NT_MS13-051.NASL
    descriptionThe remote Windows host has a version of Microsoft Office that contains a buffer overflow vulnerability that arises because certain Microsoft Office components for processing PNG files do not properly handle memory allocation. If an attacker can trick a user on the affected host into opening a specially crafted Office file, this issue could be leveraged to execute arbitrary code subject to the user
    last seen2020-06-01
    modified2020-06-02
    plugin id66867
    published2013-06-11
    reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/66867
    titleMS13-051: Vulnerability in Microsoft Office Could Allow Remote Code Execution (2839571)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    include("compat.inc");
    
    
    if (description)
    {
      script_id(66867);
      script_version("1.15");
      script_cvs_date("Date: 2018/11/15 20:50:31");
    
      script_cve_id("CVE-2013-1331");
      script_bugtraq_id(60408);
      script_xref(name:"MSFT", value:"MS13-051");
      script_xref(name:"MSKB", value:"2817421");
    
      script_name(english:"MS13-051: Vulnerability in Microsoft Office Could Allow Remote Code Execution (2839571)");
      script_summary(english:"Checks version of mso.dll");
    
      script_set_attribute(attribute:"synopsis", value:"The remote Office install has a buffer overflow vulnerability.");
      script_set_attribute(
        attribute:"description",
        value:
    "The remote Windows host has a version of Microsoft Office that contains
    a buffer overflow vulnerability that arises because certain Microsoft
    Office components for processing PNG files do not properly handle memory
    allocation.
    
    If an attacker can trick a user on the affected host into opening a
    specially crafted Office file, this issue could be leveraged to execute
    arbitrary code subject to the user's privileges."
      );
      script_set_attribute(attribute:"see_also", value:"https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2013/ms13-051");
      script_set_attribute(attribute:"solution", value:"Microsoft has released a patch for Office 2003.");
      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:"exploit_framework_core", value:"true");
      script_set_attribute(attribute:"exploited_by_malware", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2013/06/11");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/06/11");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/06/11");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:microsoft:office:2003");
    
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows : Microsoft Bulletins");
    
      script_copyright(english:"This script is Copyright (C) 2013-2018 Tenable Network Security, Inc.");
    
      script_dependencies("smb_nt_ms02-031.nasl", "office_installed.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_func.inc");
    include("smb_hotfixes.inc");
    include("smb_hotfixes_fcheck.inc");
    include("misc_func.inc");
    
    get_kb_item_or_exit("SMB/MS_Bulletin_Checks/Possible");
    
    bulletin = 'MS13-051';
    kb = '2817421';
    
    kbs = make_list(kb);
    if (get_kb_item("Host/patch_management_checks")) hotfix_check_3rd_party(bulletin:bulletin, kbs:kbs, severity:SECURITY_HOLE);
    
    # Ensure Office is installed
    office_vers = hotfix_check_office_version();
    if (isnull(office_vers)) audit(AUDIT_NOT_INST, "Microsoft Office");
    
    # Ensure we can get common files directory
    commonfiles = hotfix_get_officecommonfilesdir(officever:"11.0");
    if (!commonfiles) exit(1, "Error getting Office Common Files directory.");
    
    # Ensure share is accessible
    share = ereg_replace(pattern:"^([A-Za-z]):.*", replace:"\1$", string:commonfiles);
    if (!is_accessible_share(share:share)) audit(AUDIT_SHARE_FAIL, share);
    
    vuln = FALSE;
    # Office 2003 SP3
    if (office_vers["11.0"])
    {
      office_sp = get_kb_item("SMB/Office/2003/SP");
      if (!isnull(office_sp) && office_sp == 3)
      {
    
        path = commonfiles + "\Microsoft Shared\Office11";
    
        if (
          hotfix_is_vulnerable(file:"Mso.dll", version:"11.0.8403", min_version:'11.0.0.0', path:path, bulletin:bulletin, kb:kb)
        ) vuln = TRUE;
      }
    }
    
    if (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');
    }
    
  • NASL familyMacOS X Local Security Checks
    NASL idMACOSX_MS13-051.NASL
    descriptionThe remote Mac OS X host has a version of Microsoft Office for Mac that contains a buffer overflow vulnerability because certain Microsoft Office components for processing PNG files do not properly handle memory allocation. If an attacker can trick a user on the affected host into opening a specially crafted Office file, this issue could be leveraged to execute arbitrary code subject to the user
    last seen2019-10-28
    modified2013-06-11
    plugin id66868
    published2013-06-11
    reporterThis script is Copyright (C) 2013-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/66868
    titleMS13-051: Vulnerability in Microsoft Office Could Allow Remote Code Execution (2839571) (Mac OS X)
    code
    #TRUSTED 977c11c0a332a17279ed204a6285afc96d90b27a56698c196aad6398b8f1a0eb81435f85654c5f7cb5f4c2947018eef19ceb5b58bdbf704e4839a187290be16df5b30970aa34bb8a88598d8891e098ca00434ad639a6a9cc0f378701b8cf2681ad1a6856aa70ace650427d5ec3ce7fbaa969c6c5ec1643d54e7cfa0240b59f30d4cd08a3aa08383a9b602c510d66492e76586eab2efab79d8f7e37351a569aca76cc31c94cb9c00d9561f3692fd3bdabbf9000d42014c88a751b25b26854e05124248f70ea9893477fe69a77907c4940f9ed4f018262806744f383f84700038ff8d92c10b8ded72dc89f908c1cef74e96a8f147f39f533955190187a9ce4466d87fd89b191aff9df2c01cf6a0a7276c023de08ed3a7b767454b7b8ba39ec64dd1daab9343b4c66ebebfef89b7e8982967b63b18f9e17f4e826ebe879c001667c809e9f177afb5673110987be0d644c41230729ecdb394447931b701aa704c9dcd434aaf1d056711ffa1b7a8693c8b7de52fbedb7ea0393b6c5665506c082253d62bf8177b9a805d4629d2f7786b1f0994816534aa5186de085cf516338a40a8503a25ae57588fce227f891c14ecced819cee5e5e598c0bfb09c8dcf7db64407bccbb8d50a6d4fef23c8f84fe5c357d71e9c99a272f114ad6c4d761e1e253bee4b1990363d9e0cfecec218bb2826937302f7e5a7b4e7cb971561a139d5eb7d030
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(66868);
      script_version("1.12");
      script_set_attribute(attribute:"plugin_modification_date", value:"2018/07/14");
    
      script_cve_id("CVE-2013-1331");
      script_bugtraq_id(60408);
      script_xref(name:"MSFT", value:"MS13-051");
      script_xref(name:"MSKB", value:"2817421");
      script_xref(name:"MSKB", value:"2848689");
    
      script_name(english:"MS13-051: Vulnerability in Microsoft Office Could Allow Remote Code Execution (2839571) (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 a
    remote code execution vulnerability.");
      script_set_attribute(
        attribute:"description",
        value:
    "The remote Mac OS X host has a version of Microsoft Office for Mac that
    contains a buffer overflow vulnerability because certain Microsoft
    Office components for processing PNG files do not properly handle memory
    allocation.
    
    If an attacker can trick a user on the affected host into opening a
    specially crafted Office file, this issue could be leveraged 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/ms13-051");
      script_set_attribute(attribute:"solution", value:"Microsoft has released a patch for Office for Mac 2011.");
      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:"exploit_framework_core", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2013/06/11");
      script_set_attribute(attribute:"patch_publication_date", value:"2013/06/11");
      script_set_attribute(attribute:"plugin_publication_date", value:"2013/06/11");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      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) 2013-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';
    plist = "/Applications/Microsoft Office 2011/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;
    
      ver = split(version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(ver); i++)
        ver[i] = int(ver[i]);
    
      fixed_version = '14.3.5';
      fix = split(fixed_version, sep:'.', keep:FALSE);
      for (i=0; i<max_index(fix); i++)
        fix[i] = int(fix[i]);
    
      for (i=0; i<max_index(fix); i++)
        if ((ver[i] < fix[i]))
        {
          info +=
            '\n  Product           : ' + prod +
            '\n  Installed version : ' + version +
            '\n  Fixed version     : ' + fixed_version + '\n';
          break;
        }
        else if (ver[i] > fix[i])
          break;
    }
    
    
    # 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 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);
      }
    }
    

Oval

  • accepted2013-07-22T04:01:10.488-04:00
    classvulnerability
    contributors
    nameSecPod Team
    organizationSecPod Technologies
    definition_extensions
    • commentMicrosoft Office 2011 Service Pack 1 for Mac is installed
      ovaloval:org.mitre.oval:def:16823
    • commentMicrosoft Office 2011 Service Pack 2 for Mac is installed
      ovaloval:org.mitre.oval:def:16102
    • commentMicrosoft Office 2011 Service Pack 3 for Mac is installed
      ovaloval:org.mitre.oval:def:16926
    descriptionBuffer overflow in Microsoft Office 2003 SP3 and Office 2011 for Mac allows remote attackers to execute arbitrary code via crafted PNG data in an Office document, leading to improper memory allocation, aka "Office Buffer Overflow Vulnerability."
    familymacos
    idoval:org.mitre.oval:def:16713
    statusaccepted
    submitted2013-06-12T09:01:18
    titleVulnerability in Microsoft Office could allow remote code execution - MS13-051 (Mac OS X)
    version4
  • accepted2013-07-22T04:01:13.189-04:00
    classvulnerability
    contributors
    nameSecPod Team
    organizationSecPod Technologies
    definition_extensions
    commentMicrosoft Office 2003 SP3 is installed
    ovaloval:org.mitre.oval:def:15626
    descriptionBuffer overflow in Microsoft Office 2003 SP3 and Office 2011 for Mac allows remote attackers to execute arbitrary code via crafted PNG data in an Office document, leading to improper memory allocation, aka "Office Buffer Overflow Vulnerability."
    familywindows
    idoval:org.mitre.oval:def:16732
    statusaccepted
    submitted2013-06-12T09:01:18
    titleVulnerability in Microsoft Office could allow remote code execution - MS13-051
    version7

Saint

bid60408
descriptionMicrosoft Office PNG File Handling Buffer Overflow
idwin_patch_office13051
osvdb94127
titlems_office_png_file_handling
typeclient