← Vulnerability feed

Vulnerability record · CVE-2021-20038 · published 8 December 2021

CVE-2021-20038: SonicWall SMA 100 appliances stack buffer overflow in mod_cgi

Sonicwall · Sma 200 Firmware

A stack-based buffer overflow in the Apache httpd mod_cgi module of SonicWall SMA 100 series appliances lets a remote unauthenticated attacker overwrite memory via crafted environment variables. The flaw affects SMA 200, 210, 400, 410 and 500v firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv and earlier. Because the appliance is an internet-facing remote access gateway, successful exploitation is severe.

9.8 CVSS 3.1 Critical CISA KEV since 28 Jan 2022 Known ransomware use EPSS 100% · top 0.1% CWE-121 · Stack-based buffer overflowCWE-787 · Out-of-bounds write
9.8CVSS 3.1 base score, v2 7.5
100%EPSS exploitation probability, 30 days
YesIn CISA KEV, fix deadline passed
5Affected product versions listed by NVD
7References, 4 tagged exploit
17 Jun 2026Last modified by NVD

Description

A Stack-based buffer overflow vulnerability in SMA100 Apache httpd server's mod_cgi module environment variables allows a remote unauthenticated attacker to potentially execute code as a 'nobody' user in the appliance. This vulnerability affected SMA 200, 210, 400, 410 and 500v appliances firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv and earlier versions.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 16 September 2026. Confidence: high.

critical priorityRemote unauthenticated code execution on an internet-facing remote access appliance, listed in CISA KEV with known ransomware use and near-maximum EPSS.

What it is

A stack-based buffer overflow in the Apache httpd mod_cgi module of SonicWall SMA 100 series appliances lets a remote unauthenticated attacker overwrite memory via crafted environment variables. The flaw affects SMA 200, 210, 400, 410 and 500v firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv and earlier. Because the appliance is an internet-facing remote access gateway, successful exploitation is severe.

Impact

An attacker can execute code as the 'nobody' user on the appliance, gaining a foothold on a perimeter device that brokers remote access. From there, an attacker could pivot into internal networks or tamper with VPN and authentication services.

Attack surface

Reachable over the network through the appliance's web interface with no authentication and no user interaction, per the CVSS vector AV:N/AC:L/PR:N/UI:N. The vulnerable path is the mod_cgi handling of environment variables in the Apache httpd server.

Exploitation

CISA added this to the Known Exploited Vulnerabilities catalog on 2022-01-28 with a 2022-02-11 remediation due date and flags known ransomware campaign use. EPSS is 0.99912 (99.967th percentile), and public exploit code is referenced (badblood, Rapid7).

What to do

  • Apply the SonicWall firmware updates referenced in vendor advisory SNWLID-2021-0026 for all affected SMA 100 series models.
  • If patching cannot be done immediately, remove or restrict internet exposure of the SMA management and user interfaces to trusted networks.
  • Enable multi-factor authentication and review local accounts on the appliance for unauthorized changes.
  • Monitor SonicWall advisories and CISA KEV guidance for follow-up fixes, since this CVE was disclosed alongside related SMA 100 flaws.
  • Treat the appliance as untrusted until verified clean, and rebuild or reimage if compromise is suspected.

Detection

  • Review appliance and web server logs for malformed or unusually long CGI requests and environment-variable abuse against mod_cgi endpoints.
  • Hunt for unexpected processes or outbound connections originating from the SMA appliance, especially under the 'nobody' account.
  • Check for unauthorized configuration changes, new accounts, or altered VPN and authentication settings on the device.
  • Correlate appliance logs with network telemetry for post-exploitation activity consistent with ransomware staging.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Exploitation in the wild

CISA added CVE-2021-20038 to the Known Exploited Vulnerabilities catalog on 28 January 2022 as "SonicWall SMA 100 Appliances Stack-Based Buffer Overflow Vulnerability". CISA reports known use in ransomware campaigns. Required action: Apply updates per vendor instructions. Federal deadline 11 February 2022.

Affected products

5 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-20038 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2021-20028SonicWall SRA appliances SQL injection in end-of-life firmwareSonicWall Secure Remote Access (SRA) appliances running all 8.x firmware and 9.0.0.9-26sv or earlier fail to neutralize SQL commands, allowing SQL in…KEVEPSS 30%analysed9.8CVE-2021-20016SonicWall SMA100 SSLVPN SQL injection allows unauthenticated accessSonicWall SSLVPN SMA100 firmware 10.x contains a SQL injection flaw in its SSLVPN interface. A remote attacker with no credentials can inject SQL to …KEVEPSS 40%analysed9.1CVE-2024-38475Apache HTTP Server mod_rewrite improper escaping enables code executionApache HTTP Server 2.4.59 and earlier has an improper output escaping flaw in mod_rewrite. Substitutions in server context that use a backreference o…KEVEPSS 100%analysed7.2CVE-2023-44221SonicWall SMA100 SSL-VPN management interface OS command injectionThe SMA100 SSL-VPN management interface fails to neutralize special elements, allowing command injection. A remote attacker who already holds adminis…KEVEPSS 76%analysed6.5CVE-2021-20035SonicWall SMA100 management interface OS command injectionThe SMA100 management interface fails to neutralize special elements, letting a remote authenticated attacker inject arbitrary commands that run as t…KEVEPSS 4.2%analysed9.8CVE-2022-22273Sonicwall sma 200 firmware os command injection vulnerabilityImproper neutralization of Special Elements leading to OS Command Injection vulnerability impacting end-of-life Secure Remote Access (SRA) products a…EPSS 1.9%9.8CVE-2021-20042Sonicwall sma 200 firmware vulnerabilityAn unauthenticated remote attacker can use SMA 100 as an unintended proxy or intermediary undetectable proxy to bypass firewall rules. This vulnerabi…EPSS 2.6%9.8CVE-2021-20045Sonicwall sma 200 firmware classic buffer overflow vulnerabilityA buffer overflow vulnerability in SMA100 sonicfiles RAC_COPY_TO (RacNumber 36) method allows a remote unauthenticated attacker to potentially execut…EPSS 25%

Source: NIST National Vulnerability Database (record CVE-2021-20038), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.