QNAP QTS / QuTS hero Command Injection (QSA-21-05) - Nessus

Critical   Plugin ID: 159895

This page contains detailed information about the QNAP QTS / QuTS hero Command Injection (QSA-21-05) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 159895
Name: QNAP QTS / QuTS hero Command Injection (QSA-21-05)
Filename: qnap_qts_quts_hero_qsa-21-05.nasl
Vulnerability Published: 2021-04-16
This Plugin Published: 2022-04-19
Last Modification Time: 2022-04-22
Plugin Version: 1.2
Plugin Type: remote
Plugin Family: Misc.
Dependencies: qnap_qts_quts_hero_web_detect.nbin
Required KB Items [?]: installed_sw/QNAP QTS

Vulnerability Information


Severity: Critical
Vulnerability Published: 2021-04-16
Patch Published: 2021-04-16
CVE [?]: CVE-2020-2509
CPE [?]: cpe:/a:qnap:qts, cpe:/o:qnap:qts, cpe:/o:qnap:quts_hero

Synopsis

The remote device is missing a vendor-supplied security patch.

Description

The version of QNAP QTS or QuTS hero on the remote host is affected by a command injection vulnerability. If exploited, this vulnerability allows attackers to execute arbitrary commands in a compromised application.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Apply the workaround and upgrade to the relevant fixed version referenced in the QSA-21-05 advisory.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the QNAP QTS / QuTS hero Command Injection (QSA-21-05) vulnerability:

  1. GitHub: https://github.com/r0eXpeR/supplier
    [CVE-2020-2509]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2020-2509
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


This is the qnap_qts_quts_hero_qsa-21-05.nasl nessus plugin source code. This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(159895);
  script_version("1.2");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/22");

  script_cve_id("CVE-2020-2509");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/02");

  script_name(english:"QNAP QTS / QuTS hero Command Injection (QSA-21-05)");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is missing a vendor-supplied security patch.");
  script_set_attribute(attribute:"description", value:
"The version of QNAP QTS or QuTS hero on the remote host is affected by a command injection vulnerability. If exploited,
this vulnerability allows attackers to execute arbitrary commands in a compromised application. 

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version 
number.");
  script_set_attribute(attribute:"see_also", value:"https://www.qnap.com/en/security-advisory/qsa-21-05");
  script_set_attribute(attribute:"solution", value:
"Apply the workaround and upgrade to the relevant fixed version referenced in the QSA-21-05 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:H/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:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-2509");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/04/16");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/04/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/04/19");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:qnap:qts");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:qnap:qts");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:qnap:quts_hero");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("qnap_qts_quts_hero_web_detect.nbin");
  script_require_keys("installed_sw/QNAP QTS");

  exit(0);
}

include('http.inc');
include('vcf_extras_qnap.inc');

var port = get_http_port(default:443, ignore_broken:TRUE);
var app_info = vcf::qnap::get_app_info(port:port);

var constraints = [
  {'product':'QTS',       'min_version':'0.0',   'fixed_version':'4.2.6.0.20210327', 'fixed_display':'QTS 4.2.6 build 20210327 '},
  {'product':'QTS',       'min_version':'4.3.3', 'fixed_version':'4.3.3.1624.20210416', 'fixed_display':'QTS 4.3.3.1624 build 20210416'},
  {'product':'QTS',       'min_version':'4.3.4', 'fixed_version':'4.3.4.1632.20210324', 'fixed_display':'QTS 4.3.4.1632 build 20210324'},
  {'product':'QTS',       'min_version':'4.3.6', 'fixed_version':'4.3.6.1620.20210322', 'fixed_display':'QTS 4.3.6.1620 build 20210322'},
  {'product':'QTS',       'min_version':'4.5.1', 'fixed_version':'4.5.1.1495.20201123', 'fixed_display':'QTS 4.5.1.1495 build 20201123'},
  {'product':'QTS',       'min_version':'4.5.2', 'fixed_version':'4.5.2.1566.20210202', 'fixed_display':'QTS 4.5.2.1566 build 20210202'},
  {'product':'QuTS hero', 'min_version':'0.0',   'fixed_version':'4.5.1.1491.20201119', 'fixed_display':'QuTS hero h4.5.1.1491 build 20201119'},
];

vcf::qnap::check_version_and_report(
  app_info:app_info,
  constraints:constraints,
  severity:SECURITY_HOLE
);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/qnap_qts_quts_hero_qsa-21-05.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\qnap_qts_quts_hero_qsa-21-05.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/qnap_qts_quts_hero_qsa-21-05.nasl

Go back to menu.

How to Run


Here is how to run the QNAP QTS / QuTS hero Command Injection (QSA-21-05) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Misc. plugin family.
  6. On the right side table select QNAP QTS / QuTS hero Command Injection (QSA-21-05) plugin ID 159895.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl qnap_qts_quts_hero_qsa-21-05.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a qnap_qts_quts_hero_qsa-21-05.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - qnap_qts_quts_hero_qsa-21-05.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state qnap_qts_quts_hero_qsa-21-05.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 160542 - QNAP QTS / QuTS hero Improper Authorization Vulnerability in HBS 3 (QSA-21-13)
  • 159576 - QNAP QTS / QuTS hero Out-of-Bounds Read (QSA-21-27)
  • 159569 - QNAP QTS / QuTS hero Out-of-Bounds Read (QSA-21-40)
  • 159504 - QNAP QTS / QuTS hero Multiple Vulnerabilities in Samba (QSA-22-03)
  • 117905 - QNAP Photo Station < 5.7.0 Cross-Site Scripting Vulnerability
  • 158761 - Debian DSA-5096-1 : linux - security update
  • 159815 - EulerOS 2.0 SP9 : kernel (EulerOS-SA-2022-1429)
  • 157890 - openSUSE 15 Security Update : kernel (openSUSE-SU-2022:0363-1)
  • 157938 - openSUSE 15 Security Update : kernel (openSUSE-SU-2022:0370-1)
  • 154986 - KB5007186: Windows 10 Version 2004 / Windows 10 Version 20H2 / Windows 10 Version 21H1 (November 2021)
  • 154990 - KB5007192: Windows 10 Version 1607 and Windows Server 2016 Security Update (November 2021)
  • 154994 - KB5007205: Windows 2022 Security Update (November 2021)
  • 154993 - KB5007206: Windows 10 Version 1809 and Windows Server 2019 Security Update (November 2021)
  • 154984 - KB5007233: Windows Server 2008 R2 Security Update (November 2021)
  • 154995 - KB5007245: Windows Server 2012 Security Update (November 2021)
  • 154983 - KB5007246: Windows Server 2008 Security Update (November 2021)
  • 154996 - KB5007255: Windows Server 2012 R2 Security Update (November 2021)
  • 157898 - SUSE SLES15 Security Update : kernel (SUSE-SU-2022:0363-1)
  • 157897 - SUSE SLES15 Security Update : kernel (SUSE-SU-2022:0365-1)
  • 157932 - SUSE SLED15 / SLES15 Security Update : kernel (SUSE-SU-2022:0370-1)
  • 158225 - SUSE SLES15 Security Update : the Linux RT Kernel (SUSE-SU-2022:0543-1)
  • 159150 - SUSE SLES15 Security Update : kernel (Live Patch 13 for SLE 15 SP3) (SUSE-SU-2022:0619-1)
  • 159149 - SUSE SLES15 Security Update : kernel (Live Patch 10 for SLE 15 SP3) (SUSE-SU-2022:0660-1)
  • 107096 - Telerik UI for ASP.NET AJAX RadAsyncUpload Multiple Vulnerabilities
  • 157350 - Ubuntu 18.04 LTS / 20.04 LTS : Linux kernel (GKE) vulnerabilities (USN-5266-1)
  • 157463 - Ubuntu 20.04 LTS : Linux kernel (OEM) vulnerabilities (USN-5278-1)
  • 158159 - Ubuntu 20.04 LTS : Linux kernel vulnerabilities (USN-5294-1)
  • 158253 - Ubuntu 18.04 LTS / 20.04 LTS : Linux kernel vulnerabilities (USN-5294-2)
  • 158249 - Ubuntu 16.04 LTS / 18.04 LTS : Linux kernel vulnerabilities (USN-5298-1)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file qnap_qts_quts_hero_qsa-21-05.nasl version 1.2. For more plugins, visit the Nessus Plugin Library.

Go back to menu.