CriticalCVE-2020-9054

    Zyxel Multiple NAS Devices OS Command Injection Vulnerability (CVE-2020-9054)

    Published Last modified In CISA KEV since Sources: CVE.org

    Share

    What is affected, what to do

    An unauthenticated attacker can exploit a pre-authentication command injection vulnerability in multiple Zyxel NAS devices running firmware version 5.21 to execute arbitrary code with root privileges. This vulnerability, listed in the CISA KEV catalog, is actively exploited in the wild. Affected devices include NAS326, NAS520, NAS540, and NAS542, with firmware updates available to mitigate the risk. Immediate patching to the latest firmware version is strongly recommended to address this critical security issue.

    The vulnerability is being actively exploited; treat it as a priority. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • ZyXEL NAS326 gte V5.21(AAZF.7)C0..*
    • ZyXEL NAS520 gte V5.21(AASZ.3)C0..*
    • ZyXEL NAS540 gte V5.21(AATB.4)C0..*
    • ZyXEL NAS542 gte V5.21(ABAG.4)C0..*
    • ZyXEL NSA310 gte V4.75(AALH.2)C0..*
    • ZyXEL NSA320S gte V4.75(AANV.2)C0..*
    • ZyXEL NSA325 gte V4.81(AAAJ.1)C0..*
    • ZyXEL NSA325v2 gte V4.81(AALS.1)C0..*

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    9.8

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: CVE.org

    99.99 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.98

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    228.97 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.8
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    99.99 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.98
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 7 February 2025
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-78

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This is a trivially exploitable, network-reachable command injection that requires no authentication or user interaction and escalates to root via a setuid helper — full device takeover with very high exploitation likelihood. Consumer/SMB-grade NAS boxes like these are staple targets for automated botnet campaigns and frequently sit unmanaged in branch offices, departments or as shadow IT; the browser-triggered vector means even internal-only devices are at risk. CISA does not flag known ransomware use, but a compromised NAS holding corporate data and stored credentials is a solid foothold for exfiltration and lateral movement. Treat internet-exposed and end-of-support units as top priority (isolate or replace immediately); patched, segmented devices drop to low residual priority once verified.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Inventory: Identify every Zyxel NAS on the network (CMDB, Nmap/Zeek HTTP banners, procurement records), specifically NAS326, NAS520, NAS540, NAS542 and the end-of-support models NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325 and NSA325v2.
      • Patch: Upgrade NAS326 to V5.21(AAZF.7)C0, NAS520 to V5.21(AASZ.3)C0, NAS540 to V5.21(AATB.4)C0 and NAS542 to V5.21(ABAG.4)C0 or later. For NSA310, NSA320S, NSA325 and NSA325v2 the context lists V4.75(AALH.2)C0, V4.75(AANV.2)C0, V4.81(AAAJ.1)C0 and V4.81(AALS.1)C0 — confirm in the vendor advisory whether these builds contain the fix.
      • Kill exposure: Remove any internet reachability of the web interface (HTTP/HTTPS, typically TCP 80/443) at the perimeter firewall/NAT right now; audit routers for UPnP port mappings and disable them.
      • Unpatchable EoS units: Disconnect NSA210, NSA220, NSA220+, NSA221, NSA310S and NSA320 or move them into an isolated quarantine segment, migrate data and schedule decommissioning — no fix should be expected.
      • Assume breach: Any device that was internet-facing before patching should be treated as potentially compromised (root is reachable via the setuid utility): factory reset, reflash firmware, and rotate NAS admin passwords plus every credential stored on the device (AD/LDAP bind accounts, cloud-sync tokens, backup targets).
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Place NAS devices in a dedicated storage VLAN; allow web administration only from admin jump hosts and expose file services (SMB/NFS) separately. Crucially, exploitation can be triggered through an internal user's browser visiting a malicious page — so block user VLANs from reaching TCP 80/443 on the NAS as well.
      • Egress filtering: Default-deny outbound internet traffic from the NAS (allow only explicitly required update/sync destinations). This breaks second-stage downloads via wget/curl/tftp and C2 traffic.
      • IPS/WAF: Signature for HTTP requests to weblogin.cgi where the username parameter contains shell metacharacters (;, |, `, $(, && or URL-encoded %3B, %7C, %60, %24%28) — e.g. Suricata http.uri; content:"weblogin.cgi"; pcre:"/username=[^&]*(%3B|;|%60||%24%28|$(|%7C||)/i", plus an equivalent match on http.request_body` for POST.
      • Endpoint/browser: Enforce browser policies that restrict public sites from reaching private address ranges (Private Network Access in Chromium-based browsers) and route web traffic through a categorising proxy to narrow the drive-by vector.
      • IAM: Disable default local accounts and never store privileged domain accounts on the NAS; use dedicated least-privilege service accounts only.
    3. Runbook step 3

      Detection rules

      • Web/proxy logs: Requests to /cgi-bin/weblogin.cgi (or /adv,/cgi-bin/weblogin.cgi) with metacharacters in username. KQL shape: CommonSecurityLog | where RequestURL has "weblogin.cgi" and RequestURL matches regex @"username=[^&]*(%3B|;|%60|%24%28|%7C)".
      • Zeek/Suricata: http.log entries with destination = NAS IP, URI containing weblogin.cgi, and source from the internet or client VLANs; also flag internal-client requests to the NAS carrying a Referer from an external domain (browser-borne CSRF-style exploitation).
      • Egress telemetry: New outbound connections from the NAS to unknown internet hosts — especially HTTP downloads of ELF binaries, TFTP (UDP 69), Telnet/IRC-like sessions, or outbound mass scanning on TCP 23/80/8080 originating from the NAS (typical botnet propagation).
      • Device syslog: If the NAS forwards syslog: failed logins with abnormally long or special-character usernames, unexpected reboots, new cron entries or processes running from /tmp.
      • Sigma shape: logsource: category: webserver / selection: cs-uri-query|contains: 'weblogin.cgi' and cs-uri-query|re: 'username=[^&]*(%3B|;|%60|\$\(|%7C)' / level: critical.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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

    Source: NVD (NIST), cvelistv5, CISA KEV Catalog

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    ZyXELNAS326
    • ≥ V5.21(AAZF.7)C0
    • —
    ZyXELNAS520
    • ≥ V5.21(AASZ.3)C0
    • —
    ZyXELNAS540
    • ≥ V5.21(AATB.4)C0
    • —
    ZyXELNAS542
    • ≥ V5.21(ABAG.4)C0
    • —
    ZyXELNSA310
    • ≥ V4.75(AALH.2)C0
    • —
    ZyXELNSA320S
    • ≥ V4.75(AANV.2)C0
    • —
    ZyXELNSA325
    • ≥ V4.81(AAAJ.1)C0
    • —
    ZyXELNSA325v2
    • ≥ V4.81(AALS.1)C0
    • —

    Vendors and products

    Affected operating systems

    Affected operating systems
    Otherzyxelatp100_firmware—
    Otherzyxelatp200_firmware—
    Otherzyxelatp500_firmware—
    Otherzyxelatp800_firmware—
    Otherzyxelnas326_firmware—
    Otherzyxelnas520_firmware—
    Otherzyxelnas540_firmware—
    Otherzyxelnas542_firmware—
    Otherzyxelusg1100_firmware—
    Otherzyxelusg110_firmware—
    Otherzyxelusg1900_firmware—
    Otherzyxelusg20-vpn_firmware—
    Otherzyxelusg20w-vpn_firmware—
    Otherzyxelusg210_firmware—
    Otherzyxelusg2200_firmware—
    Otherzyxelusg310_firmware—
    Otherzyxelusg40_firmware—
    Otherzyxelusg40w_firmware—
    Otherzyxelusg60_firmware—
    Otherzyxelusg60w_firmware—
    Otherzyxelvpn1000_firmware—
    Otherzyxelvpn100_firmware—
    Otherzyxelvpn300_firmware—
    Otherzyxelvpn50_firmware—

    Weakness classes (CWE)

    • CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

      Base

      The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

      Entry at MITRE CWE-78

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited

    References & sources

    • cwe.mitre.orgdata/definitions/78.htmlx_refsource_MISC
    • zyxel.comsupport/remote-code-execution-vulnerability-of-NAS-products.sht…x_refsource_CONFIRM
    • kb.cert.orgVU#498544Third-party advisory, x_refsource_CERT-VN
    • kb.cert.orgartifacts/cve-2020-9054.htmlx_refsource_MISC
    • krebsonsecurity.com2020/02/zyxel-fixes-0day-in-network-storage-devicesx_refsource_MISC
    • cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2020-9054government-resource

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. NVD analysis modifiedNVD

      Product mapping changed:
      Show 3 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Product configurationchanged
      AND OR cpe:2.3:h:zyxel:nas326:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas326_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(aazf.7)c0
      AND OR cpe:2.3:h:zyxel:nas326:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas326_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(aazf.10)c0
      Product configurationchanged
      AND OR cpe:2.3:h:zyxel:nas540:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas540_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(aatb.4)c0
      AND OR cpe:2.3:h:zyxel:nas540:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas540_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(aatb.7)c0
      Product configurationchanged
      AND OR cpe:2.3:h:zyxel:nas542:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas542_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(abag.4)c0
      AND OR cpe:2.3:h:zyxel:nas542:-:*:*:*:*:*:*:* OR *cpe:2.3:o:zyxel:nas542_firmware:*:*:*:*:*:*:*:* versions up to (excluding) 5.21(abag.7)c0

      Source identifier: nvd@nist.gov

    2. Record modifiedcert.org

      Show 15 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://cwe.mitre.org/data/definitions/78.html
      Referenceadded
      —
      https://kb.cert.org/artifacts/cve-2020-9054.html
      Referenceadded
      —
      https://kb.cert.org/vuls/id/498544/
      Referenceadded
      —
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/
      Referenceadded
      —
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml
      Referenceremoved
      https://cwe.mitre.org/data/definitions/78.html
      —
      Referenceremoved
      https://kb.cert.org/artifacts/cve-2020-9054.html
      —
      Referenceremoved
      https://kb.cert.org/vuls/id/498544/
      —
      Referenceremoved
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/
      —
      Referenceremoved
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml
      —
      Reference typeremoved
      https://cwe.mitre.org/data/definitions/78.html Types: Third Party Advisory
      —
      Reference typeremoved
      https://kb.cert.org/artifacts/cve-2020-9054.html Types: Third Party Advisory, US Government Resource
      —
      Reference typeremoved
      https://kb.cert.org/vuls/id/498544/ Types: Third Party Advisory, US Government Resource
      —
      Reference typeremoved
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/ Types: Exploit, Third Party Advisory
      —
      Reference typeremoved
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml Types: Vendor Advisory
      —

      Source identifier: cret@cert.org

    3. Record modifiedCISA ADP

      Show 4 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Weakness type (CWE)removed
      CWE-78
      —
      Referenceadded
      —
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-9054
      Referenceremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-9054
      —
      Reference typeremoved
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2020-9054 Types: US Government Resource
      —

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    4. Record modifiedCVE Program

      Show 15 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://cwe.mitre.org/data/definitions/78.html
      Referenceadded
      —
      https://kb.cert.org/artifacts/cve-2020-9054.html
      Referenceadded
      —
      https://kb.cert.org/vuls/id/498544/
      Referenceadded
      —
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/
      Referenceadded
      —
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml
      Referenceremoved
      https://cwe.mitre.org/data/definitions/78.html
      —
      Referenceremoved
      https://kb.cert.org/artifacts/cve-2020-9054.html
      —
      Referenceremoved
      https://kb.cert.org/vuls/id/498544/
      —
      Referenceremoved
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/
      —
      Referenceremoved
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml
      —
      Reference typeremoved
      https://cwe.mitre.org/data/definitions/78.html Types: Third Party Advisory
      —
      Reference typeremoved
      https://kb.cert.org/artifacts/cve-2020-9054.html Types: Third Party Advisory, US Government Resource
      —
      Reference typeremoved
      https://kb.cert.org/vuls/id/498544/ Types: Third Party Advisory, US Government Resource
      —
      Reference typeremoved
      https://krebsonsecurity.com/2020/02/zyxel-fixes-0day-in-network-storage-devices/ Types: Exploit, Third Party Advisory
      —
      Reference typeremoved
      https://www.zyxel.com/support/remote-code-execution-vulnerability-of-NAS-products.shtml Types: Vendor Advisory
      —

      Source identifier: af854a3a-2127-422b-91ae-364da2661108

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2020-9054
    <a href="https://intel.neosec.eu/en/cve/CVE-2020-9054"><img src="https://intel.neosec.eu/badge/cve/CVE-2020-9054.svg?lang=en" alt="CVE-2020-9054 – NEOSEC Intel" height="20"></a>