Vulnerabilities > CVE-2020-3171 - OS Command Injection vulnerability in Cisco Fxos and UCS Manager
Summary
A vulnerability in the local management (local-mgmt) CLI of Cisco FXOS Software and Cisco UCS Manager Software could allow an authenticated, local attacker to execute arbitrary commands on the underlying operating system (OS) of an affected device. The vulnerability is due to insufficient input validation. An attacker could exploit this vulnerability by including crafted arguments to specific commands. A successful exploit could allow the attacker to execute arbitrary commands on the underlying OS with the privileges of the currently logged-in user for all affected platforms excluding Cisco UCS 6400 Series Fabric Interconnects. On Cisco UCS 6400 Series Fabric Interconnects, the injected commands are executed with root privileges.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 | |
Hardware | Cisco
| 19 |
OS | 2 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- 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.
- Command Delimiters An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
- Exploiting Multiple Input Interpretation Layers An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
- Argument Injection An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
- OS Command Injection In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.
Nessus
NASL family CISCO NASL id CISCO-SA-20200226-FXOS-UCS-CLI-CMDINJ-ASA.NASL description According to its self-reported version, Cisco (ASA) Software is affected by a command injection vulnerability within the local management (local-mgmt) CLI of Cisco (ASA) Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information last seen 2020-03-17 modified 2020-03-11 plugin id 134413 published 2020-03-11 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/134413 title Cisco Adaptive Security Appliance (ASA) Software Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj) code # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(134413); script_version("1.2"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/13"); script_cve_id("CVE-2020-3171"); script_xref(name:"CISCO-BUG-ID", value:"CSCvo42654"); script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-ucs-cli-cmdinj"); script_xref(name:"IAVA", value:"2020-A-0085"); script_name(english:"Cisco Adaptive Security Appliance (ASA) Software Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj)"); 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 (ASA) Software is affected by a command injection vulnerability within the local management (local-mgmt) CLI of Cisco (ASA) Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information"); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fxos-ucs-cli-cmdinj script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?78c0d1d1"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvo42654"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvo42654."); script_set_cvss_base_vector("CVSS2#AV:L/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:L/AC:L/PR:L/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-3171"); 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/11"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:adaptive_security_appliance_software"); script_set_attribute(attribute:"stig_severity", value:"II"); 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("ssh_get_info.nasl", "os_fingerprint.nasl"); script_require_keys("Host/Cisco/ASA", "Host/Cisco/ASA/model"); exit(0); } include('cisco_workarounds.inc'); include('ccf.inc'); product_info = cisco::get_product_info(name:'Cisco Adaptive Security Appliance (ASA) Software'); if (product_info.model !~ '^21[0-9][0-9]($|[^0-9])') audit(AUDIT_HOST_NOT, 'an affected Cisco ASA product'); vuln_ranges = [ {'min_ver' : '9.8', 'fix_ver' : '9.8.4.3'}, {'min_ver' : '9.9', 'fix_ver' : '9.9.2.47'}, {'min_ver' : '9.10', 'fix_ver' : '9.10.1.10'} ]; 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' , 'CSCvo42654' ); cisco::check_and_report( product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_ranges:vuln_ranges );
NASL family CISCO NASL id CISCO-SA-20200226-FXOS-UCS-CLI-CMDINJ.NASL description According to its self-reported version, Cisco FXOS Software is affected by a command injection vulnerability within the local management (local-mgmt) CLI of Cisco FXOS Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information last seen 2020-03-17 modified 2020-03-11 plugin id 134415 published 2020-03-11 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/134415 title Cisco FXOS Software Local Management CLI Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj) code # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(134415); script_version("1.2"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/13"); script_cve_id("CVE-2020-3171"); script_xref(name:"CISCO-BUG-ID", value:"CSCvo42634"); script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-ucs-cli-cmdinj"); script_xref(name:"IAVA", value:"2020-A-0085"); script_name(english:"Cisco FXOS Software Local Management CLI Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj)"); 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 command injection vulnerability within the local management (local-mgmt) CLI of Cisco FXOS Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information"); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fxos-ucs-cli-cmdinj script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?78c0d1d1"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvo42634"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvo42634."); script_set_cvss_base_vector("CVSS2#AV:L/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:L/AC:L/PR:L/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-3171"); 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/11"); 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:"II"); 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('vcf.inc'); include('audit.inc'); include('cisco_workarounds.inc'); include('ccf.inc'); app_info = vcf::get_app_info(app:'FXOS'); product_info = make_array('model' , app_info['Model'], 'version' , app_info['version'], 'name', 'FXOS'); if(product_info['model'] !~ "^(41|93)[0-9]{2}$") audit(AUDIT_HOST_NOT, 'affected'); vuln_ranges = [ {'min_ver' : '0.0', 'fix_ver': '2.2.2.91'}, {'min_ver' : '2.3', 'fix_ver': '2.3.1.144'}, {'min_ver' : '2.4', 'fix_ver': '2.4.1.234'}, {'min_ver' : '2.6', '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' , 'CSCvo42634' ); cisco::check_and_report( product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_ranges:vuln_ranges );
NASL family CISCO NASL id CISCO-SA-20200226-FXOS-UCS-CLI-CMDINJ-FTD.NASL description According to its self-reported version, Cisco (FTD) Software is affected by a command injection vulnerability within the local management (local-mgmt) CLI of Cisco (FTD) Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information last seen 2020-03-17 modified 2020-03-11 plugin id 134414 published 2020-03-11 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/134414 title Cisco Firepower Threat Defense (FTD) Software Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj) code # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(134414); script_version("1.2"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/13"); script_cve_id("CVE-2020-3171"); script_xref(name:"CISCO-BUG-ID", value:"CSCvo42654"); script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-ucs-cli-cmdinj"); script_xref(name:"IAVA", value:"2020-A-0085"); script_name(english:"Cisco Firepower Threat Defense (FTD) Software Command Injection Vulnerability (cisco-sa-20200226-fxos-ucs-cli-cmdinj)"); 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 (FTD) Software is affected by a command injection vulnerability within the local management (local-mgmt) CLI of Cisco (FTD) Software due to insufficient input validation. An authenticated, local attacker can exploit this to execute arbitrary commands on the underlying operating system (OS) of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information"); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fxos-ucs-cli-cmdinj script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?78c0d1d1"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvo42654"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvo42654."); script_set_cvss_base_vector("CVSS2#AV:L/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:L/AC:L/PR:L/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-3171"); 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/11"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:firepower"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:firepower_threat_defense"); script_set_attribute(attribute:"stig_severity", value:"II"); 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("ssh_get_info.nasl", "os_fingerprint.nasl", "cisco_asa_firepower_version.nasl", "cisco_enumerate_firepower.nbin"); script_require_keys("installed_sw/Cisco Firepower Threat Defense"); exit(0); } include('vcf.inc'); include('cisco_workarounds.inc'); include('ccf.inc'); # Based on the advisory, it seems we're looking only for FTD and not FXOS app_info = vcf::get_app_info(app:'Cisco Firepower Threat Defense'); product_info = make_array('model' , app_info['Model'], 'version' , app_info['version'], 'name', 'Cisco Firepower Threat Defense'); if(product_info['model'] !~ "^21[0-9]{2}$") audit(AUDIT_HOST_NOT, 'affected'); vuln_ranges = [ {'min_ver' : '6.2.2.0', 'fix_ver' : '6.2.3.12'}, {'min_ver' : '6.3.0.0', 'fix_ver' : '6.3.0.2'} ]; 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' , 'CSCvo42654' ); cisco::check_and_report( product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_ranges:vuln_ranges );