cbcvebase.
CVE-2020-9054
published 2020-03-04

CVE-2020-9054: Multiple ZyXEL network-attached storage (NAS) devices running firmware version 5.21 contain a pre-authentication command injection vulnerability, which may…

PriorityP199critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
KEVITWEXPLOITInitial access
CISA Known Exploited Vulnerabilitydue 2022-04-15
Exploited in the wild
EPSS
99.99%
100.0th percentile
Multiple ZyXEL network-attached storage (NAS) devices running firmware version 5.21 contain a pre-authentication command injection vulnerability, which may allow a remote, unauthenticated attacker to execute arbitrary code on a vulnerable device. 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. Although the web server does not run as the root user, ZyXEL devices include a setuid utility that can be leveraged to run any command with root privileges. As such, it should be assumed that exploitation of this vulnerability can lead to remote code execution with root privileges. By sending a specially-crafted HTTP POST or GET request to a vulnerable ZyXEL device, a remote, unauthenticated attacker may be able to execute arbitrary code on the device. This may happen by directly connecting to a device if it is directly exposed to an attacker. However, there are ways to trigger such crafted requests even if an attacker does not have direct connectivity to a vulnerable devices. For example, simply visiting a website can result in the compromise of any ZyXEL device that is reachable from the client system. Affected products include: NAS326 before firmware V5.21(AAZF.7)C0 NAS520 before firmware V5.21(AASZ.3)C0 NAS540 before firmware V5.21(AATB.4)C0 NAS542 before firmware V5.21(ABAG.4)C0 ZyXEL has made firmware updates available for NAS326, NAS520, NAS540, and NAS542 devices. Affected models that are end-of-support: NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325 and NSA325v2

Affected

39 ranges· showing 25
VendorProductVersion rangeFixed in
zyxelatp100_firmware>= 4.35 < 4.35\(abps.3\)c04.35\(abps.3\)c0
zyxelatp200_firmware>= 4.35 < 4.35\(abfw.3\)c04.35\(abfw.3\)c0
zyxelatp500_firmware>= 4.35 < 4.35\(abfu.3\)c04.35\(abfu.3\)c0
zyxelatp800_firmware>= 4.35 < 4.35\(abiq.3\)c04.35\(abiq.3\)c0
zyxelnas326V5.21(AAZF.7)C0 – V5.21(AAZF.7)C0
zyxelnas326_firmware< 5.21\(aazf.7\)c05.21\(aazf.7\)c0
zyxelnas520V5.21(AASZ.3)C0 – V5.21(AASZ.3)C0
zyxelnas520_firmware< 5.21\(aasz.3\)c05.21\(aasz.3\)c0
zyxelnas540V5.21(AATB.4)C0 – V5.21(AATB.4)C0
zyxelnas540_firmware< 5.21\(aatb.4\)c05.21\(aatb.4\)c0
zyxelnas542V5.21(ABAG.4)C0 – V5.21(ABAG.4)C0
zyxelnas542_firmware< 5.21\(abag.4\)c05.21\(abag.4\)c0
zyxelnsa210
zyxelnsa220
zyxelnsa221
zyxelnsa310V4.75(AALH.2)C0 – V4.75(AALH.2)C0
zyxelnsa320
zyxelnsa320sV4.75(AANV.2)C0 – V4.75(AANV.2)C0
zyxelnsa325V4.81(AAAJ.1)C0 – V4.81(AAAJ.1)C0
zyxelnsa325v2V4.81(AALS.1)C0 – V4.81(AALS.1)C0
zyxelusg1100_firmware>= 4.35 < 4.35\(aapk.3\)c04.35\(aapk.3\)c0
zyxelusg110_firmware>= 4.35 < 4.35\(aaph.3\)c04.35\(aaph.3\)c0
zyxelusg1900_firmware>= 4.35 < 4.35\(aapl.3\)c04.35\(aapl.3\)c0
zyxelusg20-vpn_firmware>= 4.35 < 4.35\(abaq.3\)c04.35\(abaq.3\)c0
zyxelusg20w-vpn_firmware>= 4.35 < 4.35\(abar.3\)c04.35\(abar.3\)c0

Detection & IOCsextracted from sources · hover to see the quote

path/weblogin.cgi
snort
SID 53495
snort
SID 53496
snort
SID 53507
snort
SID 53508
snort
SID 53509
snort
SID 53510
  • The exploit can be triggered via both HTTP POST and GET requests; detection should cover both methods targeting weblogin.cgi with anomalous username parameter values.
  • Exploitation does not require authentication; alert on any unauthenticated access attempts to weblogin.cgi from external/internet-facing interfaces.
  • Post-exploitation, watch for Mukashi-infected devices connecting to a C2 server and receiving commands to scan for other vulnerable IoT devices or launch DDoS attacks on specific TCP ports.
  • Exploitation can be triggered via drive-by: a victim merely visiting a malicious website can cause their browser to send crafted requests to a reachable Zyxel NAS; monitor for cross-origin requests to NAS management interfaces.
  • Check Point IPS signature 'ZyXEL NAS Command Injection (CVE-2020-9054)' is available for blocking exploitation attempts.
  • ·The web server on affected Zyxel NAS devices does not run as root, but a bundled setuid utility can be abused post-exploitation to escalate to root; detection/response should assume full root-level compromise.
  • ·Many affected Zyxel NAS models are end-of-support and will not receive patches (NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325, NSA325v2); these devices remain permanently vulnerable.
  • ·Patched firmware versions are: NAS326 V5.21(AAZF.7)C0, NAS520 V5.21(AASZ.3)C0, NAS540 V5.21(AATB.4)C0, NAS542 V5.21(ABAG.4)C0; devices running earlier firmware remain vulnerable.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.010.0CRITICALAV:N/AC:L/Au:N/C:C/I:C/A:C
vulncheck9.8CRITICAL
cisa9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.