# CVE-2021-20038: A Stack-based buffer overflow vulnerability in SMA100 Apache httpd server's mod\_cgi module environment variables allows…

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Yes: in CISA KEV since 2022-01-28; federal due date 2022-02-11; known ransomware use
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 99.91% (percentile 100, 2026-11-28)
- **CWE:** CWE-121
- **Published:** 2021-12-08T09:55:20.000Z
- **Modified:** 2026-06-17T03:33:11.327Z

## Who should check

- Anyone running SonicWall SMA100 10.2.0.8-37sv and earlier; 10.2.1.1-19sv and earlier; 10.2.1.2-24sv and earlier

## 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.

## Affected and fixed versions

- SonicWall SMA100: 10.2.0.8-37sv and earlier; 10.2.1.1-19sv and earlier; 10.2.1.2-24sv and earlier (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Timeline

- 2021-12-08: Published
- 2022-01-28: Added to CISA KEV (exploited in the wild)
- 2022-02-11: CISA remediation due date for US federal agencies
- 2026-06-17: Last modified

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-20038. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-20038.md
Affected: SonicWall SMA100 10.2.0.8-37sv and earlier; 10.2.1.1-19sv and earlier; 10.2.1.2-24sv and earlier
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for SonicWall SMA100: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-20038 being exploited?

Yes. CISA lists CVE-2021-20038 in its Known Exploited Vulnerabilities catalog since 2022-01-28, which means attacks have been seen. Public exploit code or a proof of concept is available. EPSS estimates a 99.91% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-20038?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2021-20038?

SonicWall SMA100 10.2.0.8-37sv and earlier; 10.2.1.1-19sv and earlier; 10.2.1.2-24sv and earlier.

### Is there a fix for CVE-2021-20038?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-20038?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0026>
- exploit: <https://github.com/jbaines-r7/badblood>
- exploit: <https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-20038>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-20038>
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

HTML: <https://flawdb.com/CVE-2021-20038> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-20038>
