Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2021-20039: Authenticated Command Injection in SonicWall SMA100 /cgi-bin/viewcert

Published Dec 8, 2021 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.8High · v3.1
EPSS78.7%100th percentile
CISA KEVNoNot listed
In the wildReported2 exploitation records in Mallory
Vendor
Sonicwall
IdentifiersCVE-2021-20039CWE-78 · Improper Neutralization of Special…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Exposure surface

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.

VendorProductType
SonicwallSma 200 Firmwareoperating_system
SonicwallSma 210 Firmwareoperating_system
SonicwallSma 400 Firmwareoperating_system
SonicwallSma 410 Firmwareoperating_system
SonicwallSma 500v Firmwareoperating_system
FAQ

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.
Activity feed

Recent activity

5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+1 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware3Malware families linked to this CVE, with evidence and IOCs.
Detection signatures1YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.