Initiatives for
As the national authority for Cybersecurity the CCB has developed several initiatives for specific publics which are presented here.
Reference:
Advisory #2024-27
Version:
1.0
Affected software:
QNAP QTS 4.2.x
QNAP QTS 4.3.4
QNAP QTS 4.3.6, 4.3.5
QNAP QTS 4.3.x
QNAP QTS 4.5.x, 4,4,x
QNAP QTS 5.0.0
QNAP QTS 5.0.1
QNAP QTS 5.1.x
QNAP QuTS hero h4.x
QNAP QuTS hero h5.0.0
QNAP QuTS hero h5.0.1
QNAP QuTS hero h5.1.x
QNAP QuTScloud c5.x
Type:
OS Command injection
CVE/CVSS:
CVE-2023-50358
CVSS 5.8 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L)CVE-2023-47218
CVSS 5.8 (CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L)
CVE-2023-50358 and CVE-2023-47218 are both Command injection vulnerabilities in QNAP QTS, QUTS HERO AND QUTSCLOUD that are very likely to be actively exploited. This due to the publication of a PoC detailing the vulnerabilities.
An attacker could exploit these vulnerabilities to gain Command injection leading to RCE and eventually take over the complete device. The weakness being exploited is CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')[1]
Successful exploitation of these vulnerabilities affect the availability, confidentiality and integrity lowly. It is important to mention the reason of the low impact and score the vulnerability has received: According to Rapid7 the vulnerability is only present when the device has not yet been initialized and configured but is connected to the internet. Even though the vulnerability is low impact, the CCB advices caution. A complete takeover of a device connected to you network could have a critical impact on the rest of the network.
QNAP QTS, QUTS HERO and QUTSCLOUD are all NAS devices.
CVE-2023-50358 allows for command injection via the quick.cgi component of QNAP QTS firmware, which can be accessed without authentication. Using this access an attacker could set the HTTP request parameter todo=set_timeinfo. This parameter value is saved in a /tmp/quick/quick_tmp.conf file and is not sanitized. This set value is later on processed by a vulnerable function ntp_sync_func(). This function calls ntpdate utility[1] to process the set parameter value. The rest of the string is then executed with the system() function which leads to the injected command to be executed on the system.
CVE-2023-47218 is similar to CVE-2023-50358 but the vulnerable function used is “switch_os” which calls another function uploaf_firmware_image which includes a helper function CGI_Upload which is used to construct an OS command. This command is then passed to a system call leading to the injected commands being executed.
Patch
The Centre for Cybersecurity Belgium strongly recommends installing updates for vulnerable devices with the highest priority, after thorough testing.
Follow the guidelines provided by QNAP in their security advisory (https://www.qnap.com/en/security-advisory/qsa-23-57)
Mitigate
Monitor/Detect
The CCB recommends organizations upscale monitoring and detection capabilities to identify any related suspicious activity, ensuring a swift response in case of an intrusion.
In case of an intrusion, you can report an incident via: https://ccb.belgium.be/cert/report-incident
While patching appliances or software to the newest version may provide safety from future exploitation, it does not remediate historic compromise.