Pre-authentication OS command injection in Zyxel NAS and firewall products
CVE-2020-9054 is a pre-authentication OS command injection vulnerability in the web login CGI authentication handler of multiple Zyxel NAS and firewall products. Insufficient sanitization of the username parameter allows specially crafted HTTP GET or POST requests to execute arbitrary commands with web-server privileges. On affected NAS devices, a setuid utility can subsequently provide root-level command execution. Affected products include unpatched NAS devices running firmware 5.21 and earlier and certain UTM, ATP, and VPN firewalls running ZLD V4.35 Patch 0 through Patch 2; earlier firewall firmware is not affected. Exploitation can occur through direct network access or through a malicious website visited by a client that can reach the vulnerable device. The vulnerability has been exploited in the wild, including to deploy the Mirai variant Mukashi.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation permits unauthenticated remote command execution and device takeover. On affected NAS devices, attackers can elevate execution from the web-server account to root through an existing setuid utility, enabling privileged access to device data and configuration and disruption of device operation. A public proof of concept demonstrates device shutdown, and observed exploitation has deployed botnet malware.
If you can’t patch tonight, do this now.
Remove direct internet exposure and place affected devices behind a filtering security router or firewall, particularly when firmware updates are unavailable. This is a partial workaround: a malicious website can trigger exploitation when the visiting client can reach a vulnerable device. Exploit-specific intrusion-prevention coverage is available for Zyxel NAS pre-authentication OS command injection.
Patch, then assume compromise.
Install the applicable model-specific Zyxel firmware update. Updated NAS releases include NAS326 V5.21(AAZF.10)C0, NAS520 V5.21(AASZ.3)C0, NAS540 V5.21(AATB.7)C0, and NAS542 V5.21(ABAG.7)C0. The NAS520 firmware requires contacting local support because the product is end-of-life. Affected ATP, USG, USG-VPN, VPN, and ZyWALL firewalls require their applicable patched V4.35 firmware releases. No corrective updates are provided for affected unsupported NSA210, NSA220, NSA220+, NSA221, NSA310, NSA310S, NSA320, NSA320S, NSA325, and NSA325v2 devices; decommissioning or replacing these devices is recommended.
1 exploit validated by Mallory's analysis.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
18 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.