Security Resilience

CVE-2021-20038

Memory Safety in Sonicwall Sma 200 Firmware 10.2.0.8-37sv … 10.2.1.2-24sv

CISA KEVActive ExploitationEUVD ExploitedPublic PoCRansomware-linkedMemory Safety
Published
08 December 2021
Modified
31 October 2025
KEV Added
28 January 2022
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.99 100.0th percentile
Risk Priority 97 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2021-20038 is a critical-severity Stack-based Buffer Overflow (CWE-121) vulnerability in Sonicwall Sma 200 Firmware. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 0.0% of CVEs by exploit likelihood; CISA has added it to the Known Exploited Vulnerabilities catalog; a public proof-of-concept is referenced.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

A stack-based buffer overflow vulnerability exists in the mod_cgi module of the Apache httpd server on SMA100 appliances, triggered via environment variables. It affects SonicWall SMA 200, 210, 400, 410, and 500v appliances running firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv, and earlier versions, and is also associated with CWE-121 and CWE-787.

A remote unauthenticated attacker can exploit the flaw over the network to potentially execute arbitrary code as the 'nobody' user on the appliance. The issue received a CVSS 3.1 score of 9.8, reflecting the combination of low attack complexity, no required privileges or user interaction, and full impact on confidentiality, integrity, and availability.

SonicWall PSIRT advisory SNWLID-2021-0026 and related reporting from Rapid7 document the issue, while public proof-of-concept code is available in the badblood repository.

EU & UK References

Vulnerability Data

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…

more

appliances firmware 10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv and earlier versions.

CWE(s)
KEV Date Added
28 January 2022

Related Threats

Threat-Actor AttributionAI

Microsoft Corp. (Salesforce / Slack engineer recruitment claims)
2021 Top Routinely Exploited Vulnerabilities | CISA
AnonOps
2021 Top Routinely Exploited Vulnerabilities | CISA
HiddenTear
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
Storm-0530
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
Evil Ransomware
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
Maui ransomware
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
red ransomware
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
eCh0raix
#StopRansomware: Ransomware Attacks on Critical Infrastructure Fund DPRK Malicious Cyber Activities | CISA
Google LLC (civil insider-recruitment defendant)
North Korea Cyber Group Conducts Global Espionage Campaign to Advance Regime’s Military and Nuclear Programs | CISA
North Korea Cyber Group Conducts Global Espionage Campaign to Advance Regime’s Military and Nuclear Programs | CISA
l group
North Korea Cyber Group Conducts Global Espionage Campaign to Advance Regime’s Military and Nuclear Programs | CISA

MITRE ATT&CK Enterprise Techniques

MITRE ATT&CK v20.0

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1189 Drive-by Compromise Initial Access
Adversaries may gain access to a system through a user visiting a website over the normal course of browsing.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-45318Same product: Sonicwall Sma 200 Firmware
CVE-2024-53703Same product: Sonicwall Sma 200 Firmware
CVE-2025-40596Same vendor: Sonicwall
CVE-2023-39279Same vendor: Sonicwall
CVE-2023-41712Same vendor: Sonicwall
CVE-2023-39280Same vendor: Sonicwall
CVE-2023-6340Same vendor: Sonicwall
CVE-2023-39276Same vendor: Sonicwall
CVE-2023-39277Same vendor: Sonicwall
CVE-2023-39278Same vendor: Sonicwall

Affected Assets

sonicwall
sma 200 firmware
10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv
sonicwall
sma 210 firmware
10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv
sonicwall
sma 410 firmware
10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv
sonicwall
sma 400 firmware
10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv
sonicwall
sma 500v firmware
10.2.0.8-37sv, 10.2.1.1-19sv, 10.2.1.2-24sv

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 2 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)

—

Likely Mitigating Controls

Our mappings. Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-787

Out-of-bounds writes that corrupt control flow or inject shellcode are rendered non-executable by the same memory protections.

Mitigating Controls (NIST CSF 2.0)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.

PR.PS-06 mostly match
blocks

Secure-development practices directly prevent introduction of stack buffer overflows.

ID.RA-01 partial match
blocks

Vulnerability scanning can discover stack buffer overflows but does not prevent their introduction.

PR.PS-02 partial match
blocks

Patching eliminates known instances of the weakness after discovery.

Mitigating Controls (ISO/IEC 27001:2022 Annex A)

Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.

finds

Security testing (fuzzing, static analysis) detects stack overflows before release.

prevents

Training developers in secure coding practices (bounds checking, safe memory handling) reduces some out-of-bounds write instances, but the defect requires deep technical knowledge and even trained developers make these mistakes, so only a minority of instances are prevented.

prevents

Secure coding standards explicitly forbid unsafe buffer handling that causes CWE-121.

prevents

A.8.30 carries its effect through the secure-development practices its contract requires of the supplier (8.25 to 8.29), so it reduces ordinary implementation-phase memory-safety defects in delivered code the way those practices do; the clause has a declared ceiling of `partial` on this verb, and the same reasoning that graded A.8.30 -> CWE-134 `partial` applies here.

finds

A.8.8's reach is DISCLOSURE-based: it finds stack-based buffer overflows when they appear as published CVEs/advisories in third-party components (a real but minority share, since buffer overflows do commonly surface as CVEs), but it does not reach the first-party code defects that constitute the bulk of this weakness class.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over our cross-walk; rows rated `none` are excluded, and each rule says how its mapping was checked.

Definition changed on 29 October 2026. Until then this section listed every rule rated above none, partial included. From that date it lists rules whose mapping is rated full or mostly and checked at llm_unverified or higher; partial mappings show when you ask.

No rule maps to these weaknesses at full or mostly. Tick the option above to see the partial mappings.

Oracle Linux 8 (1 partial rule)
  • V-248594 OL 8 must implement address space layout randomization (ASLR) to protect its memory from unauthorized code execution. blocks CWE-121
Oracle Linux 9 (1 partial rule)
  • V-271452 OL 9 must use a Linux Security Module configured to enforce limits on system services. blocks CWE-121

References