Vulnerabilities > CVE-2020-3187 - Path Traversal vulnerability in Cisco products
Summary
A vulnerability in the web services interface of Cisco Adaptive Security Appliance (ASA) Software and Cisco Firepower Threat Defense (FTD) Software could allow an unauthenticated, remote attacker to conduct directory traversal attacks and obtain read and delete access to sensitive files on a targeted system. The vulnerability is due to a lack of proper input validation of the HTTP URL. An attacker could exploit this vulnerability by sending a crafted HTTP request containing directory traversal character sequences. An exploit could allow the attacker to view or delete arbitrary files on the targeted system. When the device is reloaded after exploitation of this vulnerability, any files that were deleted are restored. The attacker can only view and delete files within the web services file system. This file system is enabled when the affected device is configured with either WebVPN or AnyConnect features. This vulnerability can not be used to obtain access to ASA or FTD system files or underlying operating system (OS) files. Reloading the affected device will restore all files within the web services file system.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Relative Path Traversal An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
- Directory Traversal An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
- File System Function Injection, Content Based An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
- Using Slashes and URL Encoding Combined to Bypass Validation Logic This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
- Manipulating Input to File System Calls An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Nessus
NASL family CISCO NASL id CISCO-SA-ASAFTD-PATH-JE3AZWW43-ASA.NASL description A vulnerability exists in the web services interface of Cisco Adaptive Security Appliance (ASA) Software due to a lack of proper input validation of the HTTP URL. An unauthenticated, remote attacker can exploit this, by sending a crafted HTTP request containing directory traversal character sequences, in order to view or delete arbitrary files on the targeted system within the web services file system. Please see the included Cisco BIDs and Cisco Security Advisory for more information. Note that Nessus has not tested for this issue but has instead relied only on the application last seen 2020-06-05 modified 2020-05-27 plugin id 136914 published 2020-05-27 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/136914 title Cisco Adaptive Security Appliance Software Web Services Path Traversal (cisco-sa-asaftd-path-JE3azWw43) code #TRUSTED 01eeb0ca90a72e75c969e728b24f609b09966863580d63458ddfe9952bc6573ce47ebbb6359e95a684ed5fa14cd47885de631a04f3267d6329a28ed0f8c099c84e9ecbca31ffaf0123a8b96f055e4998ac530c64de193b09c0923c6bcea8a65364c861582bbc04babf08dd5cdbc27f5d7a56ddaf1ac80d4ada63167f05c875fdd325004cbe427ef74e1a908f22de7a115d4c62747f2e6915420c9026ffe3322e28ddc9957f9fc471c5c0bb86e699509e18156477b56fa6420cbfcb6e6d8508cb53dbe816de8b4375e167687676f0f3113917053f3870066587a2b72ed09e85e3e3cb69ba6bbbfd7dca5324dd98859595466006d3ee39fff017e20434325e4d384bb2c91b1d7e83a611a9be72d603afd6b31126de5b1ed8d744b36c3a444c1cd4c7acd22e2091829726a78d92386c8e624cc423d5aa8d919bd87562dc63f5921c474417d0d3d061d0549cf4535e11a98abb5c792289c1ee3345be480cdfadb9eb1d6b5ae7c4da05d8b343c82d90f3fd900af096642e840c02a2481fe04b609854522e4053d5ede192a731b6d7b7bf3eb4f480090ff476d1d6b8c3aaf7cc1abe4a1a7d38f680121b11d46841f0dba50a1e411a250c777882dcb3d9f75e4c1f7177ba8d60a2d16e93796b5ef510d66858bdb639735518b62b5f29df938ab33c15c7bb61133d192c63172b9b4874af29357b3b3b7d75c89fc50add800a2cca80dfad # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(136914); script_version("1.4"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/04"); script_cve_id("CVE-2020-3187"); script_xref(name:"CISCO-BUG-ID", value:"CSCvr55825"); script_xref(name:"CISCO-SA", value:"cisco-sa-asaftd-path-JE3azWw43"); script_xref(name:"IAVA", value:"2020-A-0205"); script_name(english:"Cisco Adaptive Security Appliance Software Web Services Path Traversal (cisco-sa-asaftd-path-JE3azWw43)"); script_set_attribute(attribute:"synopsis", value: "The remote device is missing a vendor-supplied security patch"); script_set_attribute(attribute:"description", value: "A vulnerability exists in the web services interface of Cisco Adaptive Security Appliance (ASA) Software due to a lack of proper input validation of the HTTP URL. An unauthenticated, remote attacker can exploit this, by sending a crafted HTTP request containing directory traversal character sequences, in order to view or delete arbitrary files on the targeted system within the web services file system. Please see the included Cisco BIDs and Cisco Security Advisory for more information. Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-asaftd-path-JE3azWw43 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?7e0745c0"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr55825"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in the Cisco Security Advisory"); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-3187"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/06"); script_set_attribute(attribute:"patch_publication_date", value:"2020/05/06"); script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/27"); 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:"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("ssh_get_info.nasl", "os_fingerprint.nasl"); script_require_keys("Host/Cisco/ASA"); exit(0); } include('cisco_workarounds.inc'); include('ccf.inc'); product_info = cisco::get_product_info(name:'Cisco Adaptive Security Appliance (ASA) Software'); vuln_ranges = [ {'min_ver' : '0.0', 'fix_ver': '9.6.4.40'}, {'min_ver' : '9.7', 'fix_ver': '9.8.4.15'}, {'min_ver' : '9.9', 'fix_ver': '9.9.2.66'}, {'min_ver' : '9.10', 'fix_ver': '9.10.1.37'}, {'min_ver' : '9.11', 'fix_ver': '9.12.3.2'}, {'min_ver' : '9.13', 'fix_ver': '9.13.1.7'} ]; workarounds = make_list(CISCO_WORKAROUNDS['anyconnect_client_services'], CISCO_WORKAROUNDS['ssl_vpn']); workaround_params = make_list(); reporting = make_array( 'port' , 0, 'severity' , SECURITY_HOLE, 'version' , product_info['version'], 'bug_id' , 'CSCvr55825', 'cmds' , make_list('show running-config') ); 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-ASAFTD-PATH-JE3AZWW43-FTD.NASL description A vulnerability exists in the web services interface of Cisco Firepower Threat Defense (FTD) Software due to a lack of proper input validation of the HTTP URL. An unauthenticated, remote attacker can exploit this, by sending a crafted HTTP request containing directory traversal character sequences, in order to view or delete arbitrary files on the targeted system within the web services file system. Please see the included Cisco BIDs and Cisco Security Advisory for more information. Note that Nessus has not tested for this issue but has instead relied only on the application last seen 2020-06-13 modified 2020-05-27 plugin id 136915 published 2020-05-27 reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/136915 title Cisco Firepower Threat Defense Software Web Services Path Traversal (cisco-sa-asaftd-path-JE3azWw43) code #TRUSTED 44027408d56422337cf86231f823596cfcc833dcf32cd015a949b7a4a7bf41ec288b9cebe653c2892402897e36edb2a70c3e7a8e134c2526ea995c141b5b2563e40068f3d8428798511f5dd6501aa4acdecf093f2a86c505e94a84279ed1c92f57e3bd6b542c881daa54fc862d6938d1d4f14f5ffd327f0c56f5f60c20672b6789e529f71874a85ef3057b468f6f6cc096b69541fe46ede992638c0e0ebb99a3eaa3bf7c0b370961cd27c4da98aa79fcc0a2233f4c4e5b57887ec3bec0e8d97762c6f758d18599a9bd4df7e02539c7eb5c62db085d52c3e3a08dcb0908d34a0cecc6153c94d14a3b3a4e41ad306c9f25c948ced4e69bbe00a3ae88122e0a008c65e760eb53b35eced8f3b4d65728a0adee2c93f2557777d4f1c2dac650c0f0e28c24803729bc1b1e420726c6df9c0f2d8428fbfff62aeb1fe254be1dd6bc1bd4f206ebb8975f5b73caf3c8c978e5443e3a17b724aff8422c952386e2386db324348416e2afade20d2fa5ef2f5f2a509a65327cd8bed57135f76f40410d623e85036ff136068219e064ff3140ea2ff8f9482705acc9c31a2a043d2cb479c2f96dcc15edfcbd0609563906f0b6d4c0eb5e4ff406528a73204609680a6d69645378577210c20418aa4ae9c9d68a2340892981d9b75b47a22e427e69a8aaf1bd653537663f6ca612a9b0119b6786fd7342fe90cd4a2c096908b88e9b84fe57f7d27c # # (C) Tenable Network Security, Inc. # include('compat.inc'); if (description) { script_id(136915); script_version("1.6"); script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/12"); script_cve_id("CVE-2020-3187"); script_xref(name:"CISCO-BUG-ID", value:"CSCvr55825"); script_xref(name:"CISCO-SA", value:"cisco-sa-asaftd-path-JE3azWw43"); script_xref(name:"IAVA", value:"2020-A-0205"); script_name(english:"Cisco Firepower Threat Defense Software Web Services Path Traversal (cisco-sa-asaftd-path-JE3azWw43)"); script_set_attribute(attribute:"synopsis", value: "The remote device is missing a vendor-supplied security patch"); script_set_attribute(attribute:"description", value: "A vulnerability exists in the web services interface of Cisco Firepower Threat Defense (FTD) Software due to a lack of proper input validation of the HTTP URL. An unauthenticated, remote attacker can exploit this, by sending a crafted HTTP request containing directory traversal character sequences, in order to view or delete arbitrary files on the targeted system within the web services file system. Please see the included Cisco BIDs and Cisco Security Advisory for more information. Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-asaftd-path-JE3azWw43 script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?7e0745c0"); script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr55825"); script_set_attribute(attribute:"solution", value: "Upgrade to the relevant fixed version referenced in the Cisco Security Advisory"); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P"); script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C"); script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"); script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-3187"); script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available"); script_set_attribute(attribute:"vuln_publication_date", value:"2020/05/06"); script_set_attribute(attribute:"patch_publication_date", value:"2020/05/06"); script_set_attribute(attribute:"plugin_publication_date", value:"2020/05/27"); script_set_attribute(attribute:"plugin_type", value:"local"); script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:firepower_threat_defense"); 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"); script_require_keys("installed_sw/Cisco Firepower Threat Defense", "Host/Cisco/Firepower"); exit(0); } include('cisco_workarounds.inc'); include('ccf.inc'); product_info = cisco::get_product_info(name:'Cisco Firepower Threat Defense'); vuln_ranges = [ {'min_ver' : '0.0', 'fix_ver': '6.2.3.16'}, {'min_ver' : '6.3.0', 'fix_ver': '6.3.0.6'}, {'min_ver' : '6.4.0', 'fix_ver': '6.4.0.8'}, {'min_ver' : '6.5.0', 'fix_ver': '6.5.0.4'} ]; # Indicates that we've authenticated to an FTD CLI. Required for workaround check, set in # ssh_get_info2_cisco_firepower.inc. This should always be present. is_ftd_cli = get_kb_item_or_exit("Host/Cisco/Firepower/is_ftd_cli"); # Indicates that we've successfully run "rpm -qa --last" in expert mode to get the list of applied hotfixes. expert = get_kb_item("Host/Cisco/FTD_CLI/1/expert"); # This plugin needs both a workaround and hotfix check. If we can't check either of them, require paranoia to run. if (!is_ftd_cli || !expert) { if (report_paranoia < 2) audit(AUDIT_PARANOID); } # Don't set workarounds or hotfixes if we can't check for these. if (!is_ftd_cli) { workarounds = make_list(); extra = 'Note that Nessus was unable to check for workarounds or hotfixes'; } else { # Workarounds can be checked with just the FTD CLI workarounds = make_list(CISCO_WORKAROUNDS['anyconnect_client_services'], CISCO_WORKAROUNDS['ssl_vpn']); cmds = make_list('show running-config'); # To check hotfixes, Host/Cisco/FTD_CLI/1/expert should be set to 1 if (expert) { hotfixes['6.2.3'] = {'hotfix' : 'Hotfix_DT-6.2.3.16-3', 'ver_compare' : FALSE}; hotfixes['6.3.0'] = {'hotfix' : 'Hotfix_AO-6.3.0.6-2', 'ver_compare' : FALSE}; } else extra = 'Note that Nessus was unable to check for hotfixes'; } reporting = make_array( 'port' , 0, 'severity' , SECURITY_HOLE, 'version' , product_info['version'], 'bug_id' , 'CSCvr55825', 'fix' , 'See vendor advisory', 'extra' , extra ); if (max_index(cmds) > 0) reporting['cmds'] = cmds; cisco::check_and_report( product_info:product_info, reporting:reporting, vuln_ranges:vuln_ranges, workarounds:workarounds, firepower_hotfixes:hotfixes );