CVE-2020-9054
ZyXEL NAS products running firmware version 5.21 and earlier are vulnerable to pre-authentication command injection in weblogin.cgi
Mitigation
- Vendor workaround: Block access to the ZyXEL device web interface:
- This issue can be mitigated by blocking (for example with a firewall) access to the web interface (80/tcp and 443/tcp) of any vulnerable ZyXEL device. Any machine that can access the ZyXEL web interface should not also be able to access the internet.
- Restrict access to vulnerable ZyXEL devices:
- Direct exploitation of this vulnerability can be mitigated by restricting access to vulnerable devices. In particular, do not expose such devices directly to the internet. Note however, that it is still possible for attackers to exploit devices that are not directly connected to the internet. For example, by way of viewing a web page.
Who should check
- Anyone running ZyXEL NAS326 >= V5.21(AAZF.7)C0, <= V5.21(AAZF.7)C0
- Anyone running ZyXEL NAS520 >= V5.21(AASZ.3)C0, <= V5.21(AASZ.3)C0
- Anyone running ZyXEL NAS540 >= V5.21(AATB.4)C0, <= V5.21(AATB.4)C0
- Anyone running ZyXEL NAS542 >= V5.21(ABAG.4)C0, <= V5.21(ABAG.4)C0
- Anyone running ZyXEL NSA210 all
- Anyone running ZyXEL NSA220 all
- Anyone running ZyXEL NSA220+ all
- Anyone running ZyXEL NSA221 all
Vulnerability facts
- Affected
- ZyXEL NAS326 >= V5.21(AAZF.7)C0, <= V5.21(AAZF.7)C0; ZyXEL NAS520 >= V5.21(AASZ.3)C0, <= V5.21(AASZ.3)C0; ZyXEL NAS540 >= V5.21(AATB.4)C0, <= V5.21(AATB.4)C0; ZyXEL NAS542 >= V5.21(ABAG.4)C0, <= V5.21(ABAG.4)C0; ZyXEL NSA210 all; ZyXEL NSA220 all; ZyXEL NSA220+ all; ZyXEL NSA221 all; ZyXEL NSA310 >= V4.75(AALH.2)C0, <= V4.75(AALH.2)C0; ZyXEL NSA320 all; ZyXEL NSA320S >= V4.75(AANV.2)C0, <= V4.75(AANV.2)C0; ZyXEL NSA325 >= V4.81(AAAJ.1)C0, <= V4.81(AAAJ.1)C0; ZyXEL NSA325v2 >= V4.81(AALS.1)C0, <= V4.81(AALS.1)C0
- Fixed in
- No fix listed yet
- Exploited in the wild
- Yes: in CISA KEV since 2022-03-25; federal due date 2022-04-15
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 99.99% chance of exploitation in 30 days (percentile 100, 2026-11-26)
- CWE
- CWE-78
- Modified
Description
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| ZyXEL NAS326 | >= V5.21(AAZF.7)C0, <= V5.21(AAZF.7)C0 | — | cvelist |
| ZyXEL NAS520 | >= V5.21(AASZ.3)C0, <= V5.21(AASZ.3)C0 | — | cvelist |
| ZyXEL NAS540 | >= V5.21(AATB.4)C0, <= V5.21(AATB.4)C0 | — | cvelist |
| ZyXEL NAS542 | >= V5.21(ABAG.4)C0, <= V5.21(ABAG.4)C0 | — | cvelist |
| ZyXEL NSA210 | all | — | cvelist |
| ZyXEL NSA220 | all | — | cvelist |
| ZyXEL NSA220+ | all | — | cvelist |
| ZyXEL NSA221 | all | — | cvelist |
| ZyXEL NSA310 | >= V4.75(AALH.2)C0, <= V4.75(AALH.2)C0 | — | cvelist |
| ZyXEL NSA320 | all | — | cvelist |
| ZyXEL NSA320S | >= V4.75(AANV.2)C0, <= V4.75(AANV.2)C0 | — | cvelist |
| ZyXEL NSA325 | >= V4.81(AAAJ.1)C0, <= V4.81(AAAJ.1)C0 | — | cvelist |
| ZyXEL NSA325v2 | >= V4.81(AALS.1)C0, <= V4.81(AALS.1)C0 | — | cvelist |
Timeline
- 2020-03-04 Published
- 2022-03-25 Added to CISA KEV (exploited in the wild)
- 2022-04-15 CISA remediation due date for US federal agencies
- 2026-10-08 Last modified
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2020-9054. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2020-9054.md Affected: ZyXEL NAS326 >= V5.21(AAZF.7)C0, <= V5.21(AAZF.7)C0; ZyXEL NAS520 >= V5.21(AASZ.3)C0, <= V5.21(AASZ.3)C0; ZyXEL NAS540 >= V5.21(AATB.4)C0, <= V5.21(AATB.4)C0; ZyXEL NAS542 >= V5.21(ABAG.4)C0, <= V5.21(ABAG.4)C0; ZyXEL NSA210 all; ZyXEL NSA220 all; ZyXEL NSA220+ all; ZyXEL NSA221 all; ZyXEL NSA310 >… Fixed in: no fixed version listed yet Steps: 1. Search this machine and project for ZyXEL NAS326, ZyXEL NAS520, ZyXEL NAS540, ZyXEL NAS542, ZyXEL NSA210, ZyXEL NSA220: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2020-9054 being exploited?
Yes. CISA lists CVE-2020-9054 in its Known Exploited Vulnerabilities catalog since 2022-03-25, which means attacks have been seen. Public exploit code or a proof of concept is available. EPSS estimates a 99.99% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2020-9054?
Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2020-9054?
ZyXEL NAS326 >= V5.21(AAZF.7)C0, <= V5.21(AAZF.7)C0; ZyXEL NAS520 >= V5.21(AASZ.3)C0, <= V5.21(AASZ.3)C0; ZyXEL NAS540 >= V5.21(AATB.4)C0, <= V5.21(AATB.4)C0; ZyXEL NAS542 >= V5.21(ABAG.4)C0, <= V5.21(ABAG.4)C0; ZyXEL NSA210 all; ZyXEL NSA220 all; ZyXEL NSA220+ all; ZyXEL NSA221 all; ZyXEL NSA310 >= V4.75(AALH.2)C0, <= V4.75(AALH.2)C0; ZyXEL NSA320 all; ZyXEL NSA320S >= V4.75(AANV.2)C0, <= V4.75(AANV.2)C0; ZyXEL NSA325 >= V4.81(AAAJ.1)C0, <= V4.81(AAAJ.1)C0; ZyXEL NSA325v2 >= V4.81(AALS.1)C0, <= V4.81(AALS.1)C0.
Is there a fix for CVE-2020-9054?
No fixed version is listed in the sources yet. Vendor workaround: Block access to the ZyXEL device web interface: This issue can be mitigated by blocking (for example with a firewall) access to the web interface (80/tcp and 443/tcp) of any vulnerable ZyXEL device. Any machine that can access the ZyXEL web interface should not also be able to access the internet. Restrict access to vulnerable ZyXEL devices: Direct exploitation of this vulnerability can be mitigated by restricting access to vulnerable devices. In particular, do not expose such devices directly to the internet. Note however, that it is still possible for attackers to exploit devices that are not directly connected to the internet. For example, by way of viewing a web page.
How do I check if I'm affected by CVE-2020-9054?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.