Pre-authentication command injection in Zyxel weblogin.cgi
CVE-2020-9054 is a pre-authentication OS command injection vulnerability in the weblogin.cgi CGI program used by multiple Zyxel NAS devices, and later also reported by Zyxel as affecting certain firewall products. On affected NAS devices running firmware 5.21, weblogin.cgi does not properly sanitize the username parameter during authentication handling. A remote attacker can supply crafted metacharacters in the username field via HTTP GET or POST requests and cause arbitrary operating system commands to be executed by the web server process before authentication completes. Although the web server does not run as root, the devices include a setuid utility that can be leveraged to execute commands with root privileges, so successful exploitation should be treated as unauthenticated remote code execution as root. Affected NAS products include NAS326 before V5.21(AAZF.7)C0, NAS520 before V5.21(AASZ.3)C0, NAS540 before V5.21(AATB.4)C0, and NAS542 before V5.21(ABAG.4)C0; unsupported affected NAS models include NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325, and NSA325v2. Zyxel also stated that certain UTM, ATP, and VPN firewall products running ZLD V4.35 Patch 0 through Patch 2 were affected through the same weblogin.cgi issue.
Are you exposed to this one?
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
Impact, mitigation & remediation
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository contains a proof-of-concept (PoC) exploit for CVE-2020-9054. The main file, 'zyfuq.py', is a Python script that attempts to exploit a command injection vulnerability in a web login CGI script. The exploit works by sending a crafted POST request to the endpoint '/,adv/cgi-bin/weblogin.cgi' on a user-supplied target URL, injecting a shell command via the 'username' parameter. The script disables SSL warnings and expects the user to provide the target URL as a command-line argument. The default command executed is 'ls', but the code is structured to allow arbitrary commands. The repository also contains a README.md that notes the exploit is incomplete, but the provided code demonstrates the core injection technique. No hardcoded IPs or domains are present, but the endpoint path is fingerprintable. The exploit is a network-based PoC and does not include a weaponized or fully automated payload.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A remote code execution vulnerability in Zyxel NAS and firewall products' weblogin.cgi program caused by missing authentication, allowing OS command injection.
A command injection vulnerability in weblogin.cgi affecting multiple Zyxel NAS products, allowing unauthenticated OS command execution.
A security vulnerability exploited by Mirai botnet variants to compromise devices and expand botnet reach.
A vulnerability affecting Zyxel NAS devices, mentioned as a low-volume co-located service observed alongside 7777-Botnet infections (suggesting a possible but unconfirmed infection vector).
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.