Vulnerabilities > CVE-2020-3172 - Improper Input Validation vulnerability in Cisco Firepower Extensible Operating System

047910
CVSS 8.8 - HIGH
Attack vector
ADJACENT_NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
low complexity
cisco
CWE-20
nessus

Summary

A vulnerability in the Cisco Discovery Protocol feature of Cisco FXOS Software and Cisco NX-OS Software could allow an unauthenticated, adjacent attacker to execute arbitrary code as root or cause a denial of service (DoS) condition on an affected device. The vulnerability exists because of insufficiently validated Cisco Discovery Protocol packet headers. An attacker could exploit this vulnerability by sending a crafted Cisco Discovery Protocol packet to a Layer 2-adjacent affected device. A successful exploit could allow the attacker to cause a buffer overflow that could allow the attacker to execute arbitrary code as root or cause a DoS condition on the affected device. Note: Cisco Discovery Protocol is a Layer 2 protocol. To exploit this vulnerability, an attacker must be in the same broadcast domain as the affected device (Layer 2 adjacent). Note: This vulnerability is different from the following Cisco FXOS and NX-OS Software Cisco Discovery Protocol vulnerabilities that Cisco announced on Feb. 5, 2020: Cisco FXOS, IOS XR, and NX-OS Software Cisco Discovery Protocol Denial of Service Vulnerability and Cisco NX-OS Software Cisco Discovery Protocol Remote Code Execution Vulnerability.

Vulnerable Configurations

Part Description Count
OS
Cisco
129
Hardware
Cisco
104
Application
Cisco
6

Common Weakness Enumeration (CWE)

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.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyCISCO
    NASL idCISCO-SA-20200226-UCS-CDP.NASL
    descriptionAccording to its self-reported version, Cisco UCS Software is affected by a vulnerability in the Cisco Discovery Protocol feature due to insufficient validation of Cisco Discovery Protocol packet headers. An unauthenticated, adjacent attacker can exploit this, by sending a crafted Cisco Discovery Protocol packet to a Layer-2 adjacent affected device, in order to execute arbitrary code as root or cause a denial of service DoS condition. Please see the included Cisco BIDs and Cisco Security Advisory for more information
    last seen2020-03-17
    modified2020-03-06
    plugin id134236
    published2020-03-06
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134236
    titleCisco UCS Software Cisco Discovery Protocol Arbitrary Code Execution and DoS (cisco-sa-20200226-fxos-nxos-cdp)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(134236);
      script_version("1.2");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/10");
    
      script_cve_id("CVE-2020-3172");
      script_xref(name:"CISCO-BUG-ID", value:"CSCvr37150");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-nxos-cdp");
      script_xref(name:"IAVA", value:"2020-A-0086");
    
      script_name(english:"Cisco UCS Software Cisco Discovery Protocol Arbitrary Code Execution and DoS (cisco-sa-20200226-fxos-nxos-cdp)");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version, Cisco UCS Software is affected by a vulnerability in the Cisco Discovery
    Protocol feature due to insufficient validation of Cisco Discovery Protocol packet headers. An unauthenticated, adjacent
    attacker can exploit this, by sending a crafted Cisco Discovery Protocol packet to a Layer-2 adjacent affected device,
    in order to execute arbitrary code as root or cause a denial of service DoS condition.
    
    Please see the included Cisco BIDs and Cisco Security Advisory for more information");
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?be9c7431/");
      script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr37150");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvr37150.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-3172");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/02/26");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/02/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/06");
    
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"plugin_type", value:"remote");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:unified_computing_system");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ucs_manager_version.nasl");
      script_require_keys("installed_sw/cisco_ucs_manager", "Settings/ParanoidReport");
      script_require_ports("Services/www", 80);
    
      exit(0);
    }
    
    include('audit.inc');
    include('global_settings.inc');
    include('http.inc');
    include('install_func.inc');
    include('cisco_func.inc');
    include('audit.inc');
    
    if (report_paranoia < 2)
      audit(AUDIT_PARANOID);
    
    app = 'Cisco UCS Manager';
    get_install_count(app_name:'cisco_ucs_manager', exit_if_zero:TRUE);
    
    port = get_http_port(default:80);
    install = get_single_install(app_name:'cisco_ucs_manager', port:port, exit_if_unknown_ver:TRUE);
    
    url = build_url(qs:install['path'], port:port);
    version = tolower(install['version']);
    
    if (
        ( cisco_gen_ver_compare(a:version, b:'0.0') >= 0 &&
          cisco_gen_ver_compare(a:version, b:'3.2(3n)') < 0
        ) ||
        ( cisco_gen_ver_compare(a:version, b:'4.0') >= 0 &&
          cisco_gen_ver_compare(a:version, b:'4.0(4g)') < 0
        )
    )
    {
      report =
        '\n  URL               : ' + url +
        '\n  Installed version : ' + version +
        '\n  Fixed version     : See vendor.' +
        '\n';
      security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);
    }
    
    audit(AUDIT_WEB_APP_NOT_AFFECTED, 'Cisco UCS Manager', url, version);
    
  • NASL familyCISCO
    NASL idCISCO-SA-20200226-FXOS-CDP.NASL
    descriptionAccording to its self-reported version, Cisco FXOS Software is affected by a vulnerability in the Cisco Discovery Protocol feature due to insufficient validation of Cisco Discovery Protocol packet headers. An unauthenticated, adjacent attacker can exploit this, by sending a crafted Cisco Discovery Protocol packet to a Layer-2 adjacent affected device, in order to execute arbitrary code as root or cause a denial of service DoS condition. Please see the included Cisco BIDs and Cisco Security Advisory for more information
    last seen2020-03-17
    modified2020-03-06
    plugin id134234
    published2020-03-06
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134234
    titleCisco FXOS Software Cisco Discovery Protocol Arbitrary Code Execution and DoS (cisco-sa-20200226-fxos-nxos-cdp)
    code
    #TRUSTED 048905143334333ffa3947ae60f07e358df27ad2ae4696c9b2ffa12a82c38d0a956880d58677d79ad1bcb5beb545241131637360b83fa77c95e16f2401ea429349e55eb7bd65cae49c0704378373c86e167215ec57fb4cee9043d22874e99bb41951b1b506db03730d0aa3d1e5a026873125ef45a804ab119aed6bd1f89d7747a1eeca7d02ba8978144b8e95378a871121ffcc021f29feac2bc01ea33d22b9a5d3048042992f00c0dc7ffd86ef90ff193e049c79de3edb8417561fe13f4be080e196c57b2bc98d1bcb85b82ed127d4683e6d12c46cc8eebe3d3354a99c4ca05e586ec0ea6b0262acd5cb895a9deb2fedc4acac1259d63252ad54d09dcf883276bd7324e02db975bafac05d1c38e0c6ec484c0b4a222d3df613f78d6fb05d6624f65f0ca0b6cb5cf4a9b1bbe8a49635c9ea2e7e667166313b496baa6aae86679e2c6ada64e09574f04cfb1a8893c5aea32645339fc4d6786cdab8d4bcddc2d3fd5b82cd162316824626fd2998256b75828e9052f3a3831c2ec2ea7c69ec6471d5eba6b7dd248956bce883cd5643d8b552a8526d76dd07d4cf8156055f0c7db275a739fd41d62d7a2964b881a3144206a8aee1c50493f1a08e06a7d3898ae9ebfea89758a93698182ddf23c7554e4351edbe7428bdb7601fd7cc8da6681d6a79079e8e1197d9817586b2f7c70ade8fd2eb11fa23b8a8579cda5611cb858d6bdf33
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include('compat.inc');
    
    if (description)
    {
      script_id(134234);
      script_version("1.4");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/10");
    
      script_cve_id("CVE-2020-3172");
      script_xref(name:"CISCO-BUG-ID", value:"CSCvr37151");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-nxos-cdp");
      script_xref(name:"IAVA", value:"2020-A-0086");
    
      script_name(english:"Cisco FXOS Software Cisco Discovery Protocol Arbitrary Code Execution and DoS (cisco-sa-20200226-fxos-nxos-cdp)");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version, Cisco FXOS Software is affected by a vulnerability in the Cisco Discovery
    Protocol feature due to insufficient validation of Cisco Discovery Protocol packet headers. An unauthenticated, adjacent
    attacker can exploit this, by sending a crafted Cisco Discovery Protocol packet to a Layer-2 adjacent affected device,
    in order to execute arbitrary code as root or cause a denial of service DoS condition.
    
    Please see the included Cisco BIDs and Cisco Security Advisory for more information");
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?be9c7431/");
      script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr37151");
      script_set_attribute(attribute:"solution", value:
    "Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvr37151.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:L/Au:N/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-3172");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2020/02/26");
      script_set_attribute(attribute:"patch_publication_date", value:"2020/02/26");
      script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/06");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:fxos");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_enumerate_firepower.nbin", "cisco_asa_firepower_version.nasl");
      script_require_keys("installed_sw/FXOS");
    
      exit(0);
    }
    
    include('audit.inc');
    include('cisco_workarounds.inc');
    include('ccf.inc');
    
    product_info = cisco::get_product_info(name:'FXOS');
    product_info['model'] = product_info['Model'];
    
    if(
      isnull(product_info['model']) ||
      product_info['model'] !~ "^(41|93)[0-9]{2}"
    )
      audit(AUDIT_HOST_NOT, 'affected');
    
    vuln_ranges = [
      {'min_ver' : '0.0',  'fix_ver': '2.6.1.187'},
      {'min_ver' : '2.7',  'fix_ver': '2.7.1.106'}
    ];
    
    workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']);
    workaround_params = make_list();
    
    reporting = make_array(
      'port'     , 0,
      'severity' , SECURITY_HOLE,
      'version'  , product_info['version'],
      'bug_id'   , 'CSCvr37151'
    );
    
    cisco::check_and_report(
      product_info:product_info,
      workarounds:workarounds,
      workaround_params:workaround_params,
      reporting:reporting,
      vuln_ranges:vuln_ranges
    );
    
  • NASL familyCISCO
    NASL idCISCO-SA-20200226-NXOS-CDP.NASL
    descriptionAccording to its self-reported version, Cisco NX-OS Software is affected by a vulnerability in the Cisco Discovery Protocol feature due to insufficient validation of Cisco Discovery Protocol packet headers. An unauthenticated, adjacent attacker can exploit this, by sending a crafted Cisco Discovery Protocol packet to a Layer-2 adjacent affected device, in order to execute arbitrary code as root or cause a denial of service DoS condition. Please see the included Cisco BIDs and Cisco Security Advisory for more information.
    last seen2020-05-08
    modified2020-03-06
    plugin id134235
    published2020-03-06
    reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/134235
    titleCisco NX-OS Software Cisco Discovery Protocol Arbitrary Code Execution and DoS (cisco-sa-20200226-fxos-nxos-cdp)