On this page

Atomicorp WAF Research Note: CVE-2020-9054

Zyxel NAS Firmware 5.21- Remote Code Execution

CVE Details

Status: Attack Blocked by Atomicorp
Technical CPE data

This section lists vulnerable CPE matches retained from the NVD configurations. It supplements the readable affected-product information above.

  • cpe:2.3:o:zyxel:nas326_firmware:*:*:*:*:*:*:*:*
    • Version end (exclusive): 5.21\(aazf.7\)c0
    • NVD match criteria ID: 3FEC76CA-9F2C-4A44-93C5-C131E68B9A5E
  • cpe:2.3:o:zyxel:nas520_firmware:*:*:*:*:*:*:*:*
    • Version end (exclusive): 5.21\(aasz.3\)c0
    • NVD match criteria ID: 09DE98E7-CE8E-4F45-9F1E-4A4345FBD443
  • cpe:2.3:o:zyxel:nas540_firmware:*:*:*:*:*:*:*:*
    • Version end (exclusive): 5.21\(aatb.4\)c0
    • NVD match criteria ID: 511D5E0C-9110-4505-8DC6-5C06A10CBC20
  • cpe:2.3:o:zyxel:nas542_firmware:*:*:*:*:*:*:*:*
    • Version end (exclusive): 5.21\(abag.4\)c0
    • NVD match criteria ID: 608792D0-44B3-4A07-A48C-D3D71F26056D
  • cpe:2.3:o:zyxel:atp100_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abps.3\)c0
    • NVD match criteria ID: 1B482F4E-6E1B-45BD-A114-C389E2CD7542
  • cpe:2.3:o:zyxel:atp200_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abfw.3\)c0
    • NVD match criteria ID: 0DE3AD47-1C82-4B8B-87F4-E545A7DAFE5C
  • cpe:2.3:o:zyxel:atp500_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abfu.3\)c0
    • NVD match criteria ID: 352E7F31-76DB-4786-BCC0-E11F43550EB1
  • cpe:2.3:o:zyxel:atp800_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abiq.3\)c0
    • NVD match criteria ID: 92E70F0C-D446-47B2-809B-D4680DAF13FC
  • cpe:2.3:o:zyxel:usg20-vpn_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abaq.3\)c0
    • NVD match criteria ID: CB019CF4-75AA-4CB0-BA44-42BE620C03B3
  • cpe:2.3:o:zyxel:usg20w-vpn_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abar.3\)c0
    • NVD match criteria ID: D2C621E3-DD7D-4FD0-AD1F-6D7BFDCA38F7
  • cpe:2.3:o:zyxel:usg40_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aala.3\)c0
    • NVD match criteria ID: 9E638CFB-A13D-429D-A8E7-275959673ED6
  • cpe:2.3:o:zyxel:usg40w_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aalb.3\)c0
    • NVD match criteria ID: DB73D7EE-6A50-4DA5-B9A3-36E39244FF23
  • cpe:2.3:o:zyxel:usg60_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aaky.3\)c0
    • NVD match criteria ID: 1183A743-F349-4D93-8943-C80F8976A2BE
  • cpe:2.3:o:zyxel:usg60w_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aakz.3\)c0
    • NVD match criteria ID: 4F0D184B-31BB-4808-AF97-03599283F181
  • cpe:2.3:o:zyxel:usg110_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aaph.3\)c0
    • NVD match criteria ID: 8598C1A4-10CE-4092-9339-217AA27FF14D
  • cpe:2.3:o:zyxel:usg210_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aapi.3\)c0
    • NVD match criteria ID: B42E5510-F6BB-40DA-8115-4D324DDCF5B2
  • cpe:2.3:o:zyxel:usg310_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aapj.3\)c0
    • NVD match criteria ID: 4DE7E2A7-3083-4AB7-ABA8-9EE8585DA1C1
  • cpe:2.3:o:zyxel:usg1100_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aapk.3\)c0
    • NVD match criteria ID: DCDB08DB-DFBD-4A3C-86FD-5383D4B60248
  • cpe:2.3:o:zyxel:usg1900_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aapl.3\)c0
    • NVD match criteria ID: FAED492E-9FDD-4F6F-91E0-6EDA3036C725
  • cpe:2.3:o:zyxel:usg2200_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abae.3\)c0
    • NVD match criteria ID: A54DCF88-38E3-4660-ABC2-829B2DA5C445
  • cpe:2.3:o:zyxel:vpn50_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abhl.3\)c0
    • NVD match criteria ID: 4FFB5E9D-75AD-4696-8EDF-A7726B5F2809
  • cpe:2.3:o:zyxel:vpn100_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abfv.3\)c0
    • NVD match criteria ID: 2E5C5E12-CDDB-4DDF-AAA8-4AB499F5925F
  • cpe:2.3:o:zyxel:vpn300_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abfc.3\)c0
    • NVD match criteria ID: 0120A42B-EA67-44DC-BE04-FECF0279187C
  • cpe:2.3:o:zyxel:vpn1000_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(abip.3\)c0
    • NVD match criteria ID: A71B4358-0E6F-496E-BFCF-0B368CBD1D09
  • cpe:2.3:o:zyxel:zywall110_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aaaa.3\)c0
    • NVD match criteria ID: 025A43D2-42C3-4AEC-9C2E-61BAEB428545
  • cpe:2.3:o:zyxel:zywall310_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aaab.3\)c0
    • NVD match criteria ID: 7FB2E4BB-5684-4081-B9BA-80808E8ADD6F
  • cpe:2.3:o:zyxel:zywall1100_firmware:*:*:*:*:*:*:*:*
    • Version start (inclusive): 4.35
    • Version end (exclusive): 4.35\(aaac.3\)c0
    • NVD match criteria ID: 536BDA9F-4A29-4C59-8C39-F54794BE3026

Vulnerability 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

  1. Maintain the observed Atomicorp protections. Keep your Atomicorp commercial rules current and confirm that the selected observed rules (312659 , 340023 , 344360 , 344361 , 344363 , 344370 , 347009 ) have not been locally disabled. Atomicorp commercial rules are enabled by default. If you use Atomic WAF, review the applicable policy and rule settings.

  2. Apply the vendor’s remediation. WAF protection is defense in depth and does not replace upgrading or following the affected vendor’s guidance.

    • Affected versions: ZyXEL NAS326 versions through V5.21(AAZF.7)C0.
    • Affected versions: ZyXEL NAS520 versions through V5.21(AASZ.3)C0.
    • Affected versions: ZyXEL NAS540 versions through V5.21(AATB.4)C0.
    • Affected versions: ZyXEL NAS542 versions through V5.21(ABAG.4)C0.
    • Affected versions: ZyXEL NSA210 version all.
    • Affected versions: ZyXEL NSA220 version all.
    • Affected versions: ZyXEL NSA220+ version all.
    • Affected versions: ZyXEL NSA221 version all.
    • Affected versions: ZyXEL NSA310 versions through V4.75(AALH.2)C0.
    • Affected versions: ZyXEL NSA320 version all.
    • Affected versions: ZyXEL NSA320S versions through V4.75(AANV.2)C0.
    • Affected versions: ZyXEL NSA325 versions through V4.81(AAAJ.1)C0.
    • Affected versions: ZyXEL NSA325v2 versions through V4.81(AALS.1)C0.
    • No specific CNA/vendor solution or workaround is included in the current CVE Record (opens in a new tab) . Review the vendor’s security advisories and supported-release guidance before making changes.
    • CISA KEV required action: Apply updates per vendor instructions.
    • CISA KEV federal remediation due date: 2022-04-15
  3. Validate after changes. Confirm rule updates are current, review WAF events for the affected application, and test application behavior after vendor upgrades, mitigations, or local policy changes.

Research Notes

Atomicorp WAF protections are designed around attack techniques and exploit behaviors, allowing existing protections to apply across multiple vulnerabilities without requiring a unique rule for every CVE.

Public Vulnerability References

Test or Research Source

Research Note Context

This research note documents exploit-technique analysis associated with this vulnerability and references Atomicorp WAF protections observed during engineering review, testing, or validation activities.

Atomicorp security controls are generally designed to identify and mitigate attack techniques and exploit behaviors rather than individual CVE identifiers. As a result, protections developed for one vulnerability may also apply to related attack variants and future vulnerabilities using similar techniques.

Learn More

Atomicorp develops commercially supported security technologies for web applications, servers, endpoints, workloads, and legacy enterprise platforms.

Organizations interested in protecting systems against exploit techniques associated with vulnerabilities such as this one can learn more about:

  • Atomic ModSecurity Rules: commercially maintained WAF rules for ModSecurity deployments, including protections for web attacks, bots, scanners, malware, exploitation attempts, and emerging vulnerability classes.
  • Atomic WAF: an enterprise web application firewall with Atomicorp rules, centralized management, reporting, authentication controls, and operational tooling.
  • Atomic ModSecurity Integrator: a special licensing option for MSPs, MSSPs, OEMs, VARs, reverse proxy providers, and other integrators who want to incorporate Atomicorp ModSecurity rule technology into their own products or services.
  • Atomic OSSEC: an enterprise OSSEC-based intrusion detection, compliance, and security monitoring platform.
  • Atomic Protector: workload protection for Linux, web, cloud, data center, and hybrid environments.

For additional information, product evaluations, or technical discussions, visit https://www.atomicorp.com/ or https://modsecurity.io/ (opens in a new tab) .