Patchfirst
CVE-2020-9054 KEVPublic exploit Critical · 9.8 EPSS >99.9%

Zyxel Multiple NAS Devices OS Command Injection Vulnerability

Zyxel · Multiple Network-Attached Storage (NAS) Devices

Summary

Zyxel NAS devices (including the NAS326, NAS520, NAS540, NAS542 and several end-of-support NSA models) contain an OS command injection flaw in the weblogin.cgi authentication component, which fails to sanitize the username parameter. A remote attacker who can reach the device over the network, or who lures a user on a reachable system to visit a malicious website, can send a crafted HTTP request without authenticating and execute arbitrary commands on the device.

Official description · NVD

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

Breakdown
69.9 / 100
Exploited
Yes, in CISA KEV
Reports
0
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

First seen exploited 9 days before it was disclosed. Public exploit code (PoC-in-GitHub) appeared 18 months after disclosure.

  1. First seen exploitedVulnCheck KEV evidence9 days before
  2. Disclosedday 0
  3. Public exploit codePoC-in-GitHub+18 mo
  4. Added to CISA KEVEU database agrees+2 yrs

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

techniques

2 , grouped by in kill-chain order, 2 cited passages 2

Initial AccessTA0001

Exploit Public-Facing Application T1190 Medium
AI mapping from the description · how it is exploited

Unauthenticated crafted HTTP request to exposed service

By sending a specially-crafted HTTP POST or GET request to a vulnerable ZyXEL device
From the official description (NVD) Original (opens in a new tab) ↗

ExecutionTA0002

Command and Scripting Interpreter T1059 Medium
AI mapping from the description · primary impact

Arbitrary code execution via command injection

may allow a remote, unauthenticated attacker to execute arbitrary code on a vulnerable device
From the official description (NVD) Original (opens in a new tab) ↗

Detection

0 rules for this CVE · 244 general rules for its techniques

Rules for this CVE

0 that reference CVE-2020-9054 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

What security researchers reported

Not named in any threat report yet

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

6 links, grouped by NVD tag (5 duplicates merged)
↑ ↓ chooseEnter openEsc close