Reference material — not professional advice. Test in staging, back up first, verify against your specific version. Use your own judgment for your environment.
● Critical · CVSS 9.8 ⚠ ACTIVELY EXPLOITED — CISA KEV

How to Fix CVE-2021-20038: Stack Buffer Overflow in SonicWall SMA100

By Sai Kiran Pandrala

⚡ At a glance
SeverityCVSS 9.8 - Critical
Actively exploited?Yes, listed in CISA KEV (added 2022-01-28)
AffectedSonicWall SMA100 10.2.0.8-37sv and earlier, 10.2.1.1-19sv and earlier, 10.2.1.2-24sv and earlier
Fixed inSee vendor advisory
Type (CWE)CWE-121 Stack Buffer Overflow

Patch immediately. Actively exploited. CISA listed this in the Known Exploited Vulnerabilities catalog on 2022-01-28. Federal due date: 2022-02-11. Treat any internet-exposed instance as a priority patch.

What is CVE-2021-20038?

CVE-2021-20038 is a stack buffer overflow issue affecting SonicWall SMA100 disclosed on 2021-12-08. Crafted input triggers a memory corruption condition that can lead to code execution or process crash. CISA notes this CVE has been used in real-world attacks.

The technical detail from the advisory: 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.

Why this matters

CISA added this CVE to the Known Exploited Vulnerabilities catalog on 2022-01-28. That listing exists because at least one confirmed in-the-wild exploitation report was filed. Federal civilian agencies are bound by BOD 22-01 to patch by 2022-02-11, and most enterprises treat that timeline as a practical floor. Opportunistic scanning for known-exploited CVEs runs continuously across the public internet, so any unpatched exposed instance is on borrowed time.

The blast radius depends on how the affected service is exposed. An internet-reachable instance with no compensating controls is the highest-risk configuration. An internal-only instance behind authenticated VPN is lower risk but still requires the patch.

Am I affected?

You are affected if you run a version listed in the Affected row above. Check your installed build of SonicWall SMA100 against that list. If your version sits at or below the affected range and you have not applied the vendor patch noted in the Fixed in row, you are vulnerable.

For internet-facing or business-critical instances, treat this as exposure until proven otherwise. Run an asset inventory to find every install of SonicWall SMA100, including secondary or dev/test environments that may have been deployed and forgotten.

How to fix CVE-2021-20038

  1. Read the official vendor advisory linked in References below. It carries the authoritative list of patched builds and any product-specific upgrade notes.
  2. Inventory affected hosts before touching anything. Know how many instances you have, which are exposed, and which are HA-paired.
  3. Take a configuration backup of the affected device or application.
  4. Apply the patched build named in the Fixed in row. For HA pairs, patch the standby first, fail over, then patch the former primary.
  5. Restart the service or device if the vendor procedure requires it.
  6. Confirm the new version is running (see verification section).
  1. Hunt for prior compromise. Because this CVE is in the CISA KEV catalog, assume opportunistic scanning has already touched any exposed instance. Review authentication logs, look for unfamiliar accounts, and check for unexpected processes or scheduled tasks.

Upgrade the Sonicwall appliance


# Confirm the running firmware
show version    # or use the web admin firmware page

# Stage the patched image from the vendor advisory: https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0026
# Web admin: System -> Firmware Update -> upload the patched image and reboot.

# After reboot, confirm
show version

Verify the fix landed


# 1. Confirm the running version matches the fixed-in version from the advisory:
#    https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0026
#    Use the platform-specific version probe above.

# 2. Re-scan with your vulnerability scanner (Nessus, Qualys, Tenable, OpenVAS).
#    The scanner should no longer flag CVE-2021-20038 on the patched target.

# 3. Inspect recent service / kernel logs for crash loops or rollback events.
journalctl -u <service> --since "10 minutes ago"
dmesg --since "10 minutes ago"

If you can't patch immediately

Apply vendor-published mitigations only. Common interim steps:

If the vendor advisory does not list a workaround, none has been validated. Patching is the only remediation in that case.

How to verify the fix worked

  1. Check the running version of SonicWall SMA100 matches a build named in the Fixed in row.
  2. Re-run your vulnerability scanner against the host. The CVE should no longer flag.
  3. If you applied mitigations instead of a patch, confirm those controls are still in place after the next reboot or configuration change.
  4. Review logs from the exposure window. Anything anomalous needs an incident-response review, not a passive note.

Frequently asked questions

Other vulnerabilities in the same area that are worth patching alongside this one:

Is this CVE being exploited in the wild?

Yes. CISA added CVE-2021-20038 to the Known Exploited Vulnerabilities catalog on 2022-01-28, which means at least one confirmed real-world exploitation report exists.

Do I need to take the system offline to patch?

That depends on the vendor's upgrade procedure for SonicWall SMA100. For HA-paired devices and clustered software, the standard pattern is to patch the standby instance first, fail over, and then patch the former primary. Read the vendor advisory for the exact steps.

Will my vendor support contract cover the patched build?

If your installation is on a supported release line, the patched build is usually a free upgrade. End-of-life or end-of-support builds may require a paid migration to a supported major version.

References


*Assembled from the official vendor advisory, NVD record, and CISA KEV listing on 2026-05-25. Always confirm against the vendor advisory before applying changes in production.*