CVE-2021-20039: Authenticated Command Injection in SonicWall SMA100 /cgi-bin/viewcert
- Vendor
- Sonicwall
CVE-2021-20039 is an authenticated command injection vulnerability in the SonicWall SMA 100 series management interface. The flaw is present in the '/cgi-bin/viewcert' POST handler, where special elements are not properly neutralized, allowing an authenticated remote attacker to inject arbitrary operating system commands. Affected products include SonicWall SMA 200, 210, 400, 410, and 500v appliances. Available reporting characterizes the issue as enabling command execution on the appliance, with some references stating execution occurs as the low-privilege 'nobody' user and others stating it can result in root-level command execution and full device takeover. The vulnerability has been described as an authenticated remote code execution path and has been observed in intrusion activity involving persistence on compromised SMA appliances.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows an authenticated attacker to execute arbitrary commands on the affected SMA appliance. This can lead to compromise of the device itself, installation of web shells or proxy tooling, persistence on the edge appliance, credential access, and use of the appliance as a pivot point into internal networks. Reporting also indicates the vulnerability can enable full takeover of unpatched devices.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, restrict access to the SMA management interface to trusted administrative networks only, minimize the number of accounts permitted to authenticate to the appliance, enforce strong MFA for administrative access, rotate credentials associated with the appliance, and closely monitor the device for unauthorized configuration changes, unexplained sessions, log anomalies, unexpected reboots, or persistence artifacts. Because edge appliance compromise may persist beyond simple patching, suspected devices should be investigated for web shells, backdoors, and other post-exploitation modifications, and rebuilt or replaced if compromise is confirmed.
Remediation
Patch, then assume compromise.
Upgrade affected SonicWall SMA 100 series appliances to the vendor-fixed firmware versions provided through SonicWall advisories and MySonicWall. The available patch set addressing the SMA100 vulnerabilities includes fixes for CVE-2021-20039 along with related issues in the same appliance family. Organizations should verify that all SMA 200, 210, 400, 410, and 500v systems are running the corrected firmware and review the appliances for signs of prior compromise before returning them to service.
Exploits
1 exploit validated by Mallory's analysis.
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.
References
Frequently asked questions
- Is CVE-2021-20039 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2021-20039?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2021-20039, the earliest disclosed Dec 14, 2021.
- Is there a patch for CVE-2021-20039?
- Upgrade affected SonicWall SMA 100 series appliances to the vendor-fixed firmware versions provided through SonicWall advisories and MySonicWall. The available patch set addressing the SMA100 vulnerabilities includes fixes for CVE-2021-20039 along with related issues in the same appliance family.
- What products are affected by CVE-2021-20039?
- Sonicwall Sma 200 Firmware, Sonicwall Sma 210 Firmware, Sonicwall Sma 400 Firmware, Sonicwall Sma 410 Firmware, and Sonicwall Sma 500v Firmware.
- How severe is CVE-2021-20039?
- CVE-2021-20039 has a CVSS v3.1 score of 8.8 (High) and an EPSS score of 78.7% (100th percentile) as of Oct 16, 2026.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.