Zyxel has released security patches to address a critical remote code execution vulnerability, tracked as CVE-2020-9054, that affects several NAS devices. The flaw can be exploited by an
An attacker could include certain characters in the username passed the executable to trigger the vulnerability and carry out command injection with the privileges of the
“Multiple ZyXEL network-attached storage (NAS) devices contain a pre-authentication command injection vulnerability, which may allow a remote, unauthenticated attacker to execute arbitrary code on a vulnerable device.” reads the advisory published by CERT/CC.
“ZyXEL NAS devices achieve authentication by using the weblogin.cgi CGI executable. This program fails to properly sanitize the username parameter that is passed to it. If the username parameter contains certain characters, it can allow command injection with the privileges of the web server that runs on the ZyXEL device.”
Experts explained that ZyXEL NAS devices include a setuid utility that can be used to run any command with root privileges.
Experts at CERT/CC warn of the availability online of working exploit code for this issue, for this reason, they have created a PoC exploit that power down affected ZyXEL devices.
According to the popular investigator Brian Krebs, a working exploit is available for sale on underground forums for $20,000. Krebs shared his
“Zyxel NAS (Network Attached Storage) products are affected by a remote code execution vulnerability. Users are advised to install the
“A remote code execution vulnerability was identified in the weblogin.cgi program of Zyxel NAS products running firmware version 5.21 and earlier. Missing authentication for the program could allow attackers to perform remote code execution via OS command injection,”
An attacker could exploit the vulnerability by sending a specially-crafted HTTP POST or GET request. The issue could be also triggered if the attacker does not have direct connectivity to the device, but he is able to trick the victim into visiting a malicious website.
The vulnerability could be exploited by threat actors in the wild for large-scale attacks.
Zyxel released security fixes for NAS326, NAS520, NAS540, and NAS542 devices, but the NAS devices NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325 and NSA325v2 will not receive any patch because are no longer supported by the vendor
“Do not leave the product directly exposed to the internet. If possible, connect it to a security router or firewall for additional protection,” Zyxel recommends.
CERT/CC also provides mitigations such as blocking access to the web interface (80/tcp and 443/tcp) and avoiding exposing the NAS to the Internet.