CVE-2021-20038: Unauthenticated RCE in SonicWall SMA 100 mod_cgi
- Vendor
- Sonicwall
CVE-2021-20038 is a stack-based buffer overflow in the Apache httpd mod_cgi environment-variable handling of SonicWall SMA 100 series appliances. During HTTP GET processing, the vulnerable code uses strcat to concatenate environment-variable data into a single stack buffer. A remote unauthenticated attacker can potentially exploit the overflow to execute code as the low-privilege nobody user. Affected models are SMA 200, 210, 400, 410, and 500v, running firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv, and earlier versions.
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 can provide remote code execution under the appliance's nobody account, potentially enabling malware installation and control of the affected appliance within that account's permissions. Exploitation has been observed in the wild, including use by DPRK actors for initial access. This vulnerability alone does not establish root-level execution.
Mitigation
If you can’t patch tonight, do this now.
The appliance's web application firewall does not prevent exposure to this vulnerability and is not a substitute for patching. Least-privilege access and multilayer network segmentation can reduce post-compromise impact, but no vulnerability-specific non-patching workaround is established.
Remediation
Patch, then assume compromise.
Upgrade affected appliances to firmware 10.2.0.9-41sv or 10.2.1.3-27sv, or a later applicable vendor release. Review installed firmware and apply the latest supported SonicWall update immediately.
Exploits
2 exploits 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-20038 exploited in the wild?
- Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jan 28, 2022.
- Is there a public exploit for CVE-2021-20038?
- Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2021-20038, the earliest disclosed Jan 11, 2022.
- Is there a patch for CVE-2021-20038?
- Upgrade affected appliances to firmware 10.2.0.9-41sv or 10.2.1.3-27sv, or a later applicable vendor release. Review installed firmware and apply the latest supported SonicWall update immediately.
- What products are affected by CVE-2021-20038?
- 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-20038?
- CVE-2021-20038 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 99.9% (100th percentile) as of Oct 16, 2026.
Recent activity
16 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.