Vulnerabilities > CVE-2007-5020 - Code Injection vulnerability in Adobe Acrobat and Acrobat Reader

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

Summary

Unspecified vulnerability in Adobe Acrobat and Reader 8.1 on Windows allows remote attackers to execute arbitrary code via a crafted PDF file, related to the mailto: option and Internet Explorer 7 on Windows XP. NOTE: this information is based upon a vague pre-advisory by a reliable researcher.

Vulnerable Configurations

Part Description Count
Application
Adobe
2

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.

Nessus

  • NASL familyWindows
    NASL idADOBE_ACROBAT_811.NASL
    descriptionThe version of Adobe Acrobat installed on the remote host is earlier than 8.1.1. Such versions allow execution of arbitrary code by means of a specially crafted PDF file with a malicious
    last seen2020-06-01
    modified2020-06-02
    plugin id40799
    published2009-08-28
    reporterThis script is Copyright (C) 2009-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/40799
    titleAdobe Acrobat < 8.1.1 Crafted PDF File Arbitrary Code Execution
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(40799);
      script_version("1.12");
     script_cvs_date("Date: 2018/11/15 20:50:26");
    
      script_cve_id("CVE-2007-5020");
      script_bugtraq_id(25748);
    
      script_name(english:"Adobe Acrobat < 8.1.1 Crafted PDF File Arbitrary Code Execution");
      script_summary(english:"Checks version of Adobe Acrobat");
    
      script_set_attribute(attribute:"synopsis", value:
    "The version of Adobe Acrobat on the remote Windows host allows
    execution of arbitrary code.");
    
      script_set_attribute(attribute:"description", value:
    "The version of Adobe Acrobat installed on the remote host is earlier
    than 8.1.1. Such versions allow execution of arbitrary code by means
    of a specially crafted PDF file with a malicious 'mailto:' link.
    
    Note that the issue only exists on systems running Windows XP or
    Windows 2003 with Internet Explorer 7.0.");
    
      script_set_attribute(attribute:"see_also", value:"https://www.adobe.com/support/security/bulletins/apsb07-18.html");
    
      script_set_attribute(attribute:"solution", value:
    "Upgrade to Adobe Acrobat 8.1.1 or later or disable 'mailto' support as
    described in the vendor advisory.");
      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:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');
      script_cwe_id(94);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2008/05/29");
      script_set_attribute(attribute:"patch_publication_date", value:"2008/11/04");
      script_set_attribute(attribute:"plugin_publication_date", value:"2009/08/28");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:acrobat");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
    
      script_copyright(english:"This script is Copyright (C) 2009-2018 Tenable Network Security, Inc.");
    
      script_dependencies("adobe_acrobat_installed.nasl", "smb_hotfixes.nasl", "smb_nativelanman.nasl");
      script_require_keys("SMB/Acrobat/Version", "Host/OS/smb", "SMB/Registry/Enumerated");
      script_require_ports(139, 445);
    
      exit(0);
    }
    
    include("smb_func.inc");
    include("smb_hotfixes.inc");
    
    # Only XP and 2003 are affected.
    os = get_kb_item("Host/OS/smb");
    if (!os) exit(1, "The 'Host/OS/smb' KB item is missing.");
    
    if ("Windows 5.1" >!< os || "Windows 5.2" >!< os)
      exit( 0, "Only Windows XP and Windows 2003 are vulnerable." );
    
    ie = hotfix_check_ie_version();
    if (isnull(ie) || !ereg(pattern:"^7\.", string:ie))
      exit( 0, "Only installations of IE 7 are vulnerable." );
    
    version = get_kb_item("SMB/Acrobat/Version");
    if (isnull(version)) exit(1, "The 'SMB/Acrobat/Version' KB item is missing.");
    
    if (version =~ "^(7\.0\.|8\.(0\.|1\.0))")
    {
      # If we're paranoid, don't bother checking for the workaround.
      if (report_paranoia > 1)
      {
        report = string(
          "Note that Nessus did not check whether 'mailto' support was disabled\n",
          "for Adobe Acrobat because of the Report Paranoia setting in effect when\n",
          "this scan was run.\n"
        );
      }
      # Otherwise, look in the registry for the workaround.
      else
      {
        if (!get_kb_item("SMB/Registry/Enumerated")) exit(0);
    
        # Connect to the appropriate share.
        name    =  kb_smb_name();
        port    =  kb_smb_transport();
        #if (!get_port_state(port)) exit(0);
        login   =  kb_smb_login();
        pass    =  kb_smb_password();
        domain  =  kb_smb_domain();
    
        #soc = open_sock_tcp(port);
        #if (!soc) exit( 1, 'Failed to open socket' );
    
        #session_init(socket:soc, hostname:name);
        if(!smb_session_init()) exit(0);
    
        rc = NetUseAdd(login:login, password:pass, domain:domain, share:"IPC$");
        if (rc != 1)
        {
          NetUseDel();
          exit( 1, "Can't connect to IPC$ share." );
        }
    
        # Connect to remote registry.
        hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
        if (isnull(hklm))
        {
          NetUseDel();
          exit( 1, "Can't connect to the remote registry." );
        }
    
        # Get the launch permissions.
        perms = NULL;
    
        key = "SOFTWARE\Adobe\Acrobat Acrobat\7.0\FeatureLockDown\cDefaultLaunchURLPerms";
        key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
        if (!isnull(key_h))
        {
          value = RegQueryValue(handle:key_h, item:"tSchemePerms");
          if (!isnull(value)) perms = value[1];
          RegCloseKey(handle:key_h);
        }
        RegCloseKey(handle:hklm);
    
        # Clean up.
        NetUseDel();
    
        # Check perms.
        if (isnull(perms) || "|mailto:3|" >!< perms)
        {
          report = string(
            "Nessus determined that Adobe's 'mailto' support has not been disabled in\n",
            "the registry.\n"
          );
        }
        else
          exit( 0, 'The workaround of disabling \'mailto\' support is in place.' );
      }
    
      version_ui = get_kb_item("SMB/Acrobat/Version_UI");
      if (report_verbosity > 0 && version_ui)
      {
        path = get_kb_item("SMB/Acrobat/Path");
        if (isnull(path)) path = "n/a";
    
        report = string(
          "\n",
          "  Path              : ", path, "\n",
          "  Installed version : ", version_ui, "\n",
          "  Fix               : 8.1.2 / 7.1.0\n",
          "\n",
          report
        );
        security_hole(port:port, extra:report);
      }
      else security_hole(port);
    }
    else exit(0, "Acrobat "+version+" is not affected.");
    
  • NASL familyWindows
    NASL idADOBE_READER_811.NASL
    descriptionThe installation of Adobe Reader on the remote host allows execution of arbitrary code by means of a specially crafted PDF file with a malicious
    last seen2020-06-01
    modified2020-06-02
    plugin id27584
    published2007-10-26
    reporterThis script is Copyright (C) 2007-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/27584
    titleAdobe Reader < 8.1.1 Crafted PDF File Arbitrary Code Execution
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(27584);
      script_version("1.21");
      script_cvs_date("Date: 2018/11/15 20:50:26");
    
      script_cve_id("CVE-2007-5020");
      script_bugtraq_id(25748);
    
      script_name(english:"Adobe Reader < 8.1.1 Crafted PDF File Arbitrary Code Execution ");
      script_summary(english:"Checks version of Adobe Reader");
    
      script_set_attribute(attribute:"synopsis", value:
    "The PDF file viewer on the remote Windows host allows execution of
    arbitrary code.");
      script_set_attribute(attribute:"description", value:
    "The installation of Adobe Reader on the remote host allows execution
    of arbitrary code by means of a specially crafted PDF file with a
    malicious 'mailto:' link.
    
    Note that the issue only exists on systems running Windows XP or
    Windows 2003 with Internet Explorer 7.0.");
      script_set_attribute(attribute:"see_also", value:"https://www.gnucitizen.org/blog/0day-pdf-pwns-windows/");
      script_set_attribute(attribute:"see_also", value:"https://www.securityfocus.com/archive/1/archive/1/480080/100/0/threaded" );
      script_set_attribute(attribute:"see_also", value:"https://www.adobe.com/support/security/bulletins/apsb07-18.html" );
      script_set_attribute(attribute:"solution", value:
    "Upgrade to Adobe Reader 8.1.1 or later or disable 'mailto' support as
    described in the vendor advisory above.");
      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:"exploit_framework_canvas", value:"true");
      script_set_attribute(attribute:"canvas_package", value:'D2ExploitPack');
      script_cwe_id(94);
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2007/09/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2007/10/22");
      script_set_attribute(attribute:"plugin_publication_date", value:"2007/10/26");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:acrobat_reader");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Windows");
      script_copyright(english:"This script is Copyright (C) 2007-2018 Tenable Network Security, Inc.");
    
      script_dependencies("adobe_reader_installed.nasl", "smb_hotfixes.nasl", "smb_nativelanman.nasl");
      script_require_keys("SMB/Acroread/Version", "Host/OS/smb", "SMB/Registry/Enumerated");
      script_require_ports(139, 445);
      exit(0);
    }
    
    #
    
    include("smb_func.inc");
    include("smb_hotfixes.inc");
    include("audit.inc");
    
    # Only XP and 2003 are affected.
    os = get_kb_item("Host/OS/smb");
    if (!os) exit(0, 'The "Host/OS/smb" KB item is missing.');
    
    if ("Windows 5.1" >!< os && "Windows 5.2" >!< os)
      exit(0, 'The remote host does not appear to be Windows XP or 2003.');
    
    # And it requires IE 7.
    ie = hotfix_check_ie_version();
    if (isnull(ie) || !ereg(pattern:"^7\.", string:ie))
      exit(0, 'The remote host does not appear to have IE 7 installed.');
    
    port = kb_smb_transport();
    
    # Check for the workaround (if not paranoid)
    if (report_paranoia < 2)
    {
      if (!get_kb_item("SMB/Registry/Enumerated")) exit(0);
    
      # Connect to the appropriate share.
      name    =  kb_smb_name();
      #if (!get_port_state(port)) exit(0);
      login   =  kb_smb_login();
      pass    =  kb_smb_password();
      domain  =  kb_smb_domain();
    
      #soc = open_sock_tcp(port);
      #if (!soc) exit(0);
    
      #session_init(socket:soc, hostname:name);
      if(!smb_session_init()) audit(AUDIT_FN_FAIL, 'smb_session_init');
    
      rc = NetUseAdd(login:login, password:pass, domain:domain, share:"IPC$");
      if (rc != 1)
      {
        NetUseDel();
        exit(0);
      }
    
      # Connect to remote registry.
      hklm = RegConnectRegistry(hkey:HKEY_LOCAL_MACHINE);
      if (isnull(hklm))
      {
        NetUseDel();
        exit(0);
      }
    
      # Get the launch permissions.
      perms = NULL;
    
      key = "SOFTWARE\Adobe\Acrobat Reader\7.0\FeatureLockDown\cDefaultLaunchURLPerms";
      key_h = RegOpenKey(handle:hklm, key:key, mode:MAXIMUM_ALLOWED);
      if (!isnull(key_h))
      {
        value = RegQueryValue(handle:key_h, item:"tSchemePerms");
        if (!isnull(value)) perms = value[1];
        RegCloseKey(handle:key_h);
      }
      RegCloseKey(handle:hklm);
    
      # Clean up.
      NetUseDel();
    
      # Check perms.
      if (!isnull(perms) && "|mailto:3|" >< perms)
        exit(0, "Adobe's 'mailto' support has been disabled in the registry, therefore the host is not affected.");
    }
    
    info = NULL;
    vers = get_kb_list("SMB/Acroread/Version");
    if (isnull(vers)) exit(0, 'The "SMB/Acroread/Version" KB item is missing.');
    
    foreach ver (vers)
    {
      if (ver && ver =~ "^(7\.0\.|8\.(0\.|1\.0))")
      {
        path = get_kb_item('SMB/Acroread/'+ver+'/Path');
        if (isnull(path)) exit(1, 'The "SMB/Acroread/'+ver+'/Path" KB item is missing.');
    
        verui = get_kb_item('SMB/Acroread/'+ver+'/Version_UI');
        if (isnull(verui)) exit(1, 'The "SMB/Acroread/'+ver+'/Version_UI" KB item is missing.');
    
        info += '  - ' + verui + ', under ' + path + '\n';
      }
    }
    
    if (isnull(info)) exit(0, 'The host is not affected.');
    
    if (report_verbosity > 0)
    {
      if (max_index(split(info)) > 1) s = "s of Adobe Reader are";
      else s = " of Adobe Reader is";
    
      report =
        '\nThe following vulnerable instance'+s+' installed on the'+
        '\nremote host :\n\n'+
        info;
      if (report_paranoia > 1)
      {
        report += '\nNote that Nessus did not check whether \'mailto\' support was disabled'+
                  '\nfor Adobe Reader because of the Report Paranoia setting in effect when'+
                  '\nthis scan was run.\n';
      }
      else
      {
        report += '\nNessus determined that Adobe\'s \'mailto\' support has not been disabled in'+
                  '\nthe registry.\n';
      }
    
      security_hole(port:port, extra:report);
    }
    else security_hole(port);
    

Statements

contributorMark J Cox
lastmodified2007-10-08
organizationRed Hat
statementAccording to Abobe this issue affects only the Windows platform and therefore does not affect Adobe Acrobat Reader as distributed with Red Hat Enterprise Linux Extras. http://www.adobe.com/support/security/advisories/apsa07-04.html