# CVE-2021-20021: SonicWall Email Security Improper Privilege Management

> Attackers can create administrative accounts via crafted HTTP requests, leading to full system compromise on SonicWall Email Security appliances.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 3 Nov 2021 (CISA KEV), used in ransomware
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 9 Apr 2021
- **Updated:** 12 Aug 2026
- **Also known as:** GHSA-qwrf-wf47-mf5j

## What is CVE-2021-20021?

CVE-2021-20021 is a critical vulnerability in SonicWall Email Security, published on 9 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability in the SonicWall Email Security version 10.0.9.x allows an attacker to create an administrative account by sending a crafted HTTP request to the remote host.

Weakness: CWE-269 (Improper Privilege Management)

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

It affects 11 products.


Products: Sonicwall Email Security, Sonicwall Email Security Appliance 3300 Firmware, Sonicwall Email Security Appliance 4300 Firmware, Sonicwall Email Security Appliance 5000 Firmware, Sonicwall Email Security Appliance 5050 Firmware, Sonicwall Email Security Appliance 7000 Firmware, Sonicwall Email Security Appliance 7050 Firmware, Sonicwall Email Security Appliance 8300 Firmware, Sonicwall Email Security Appliance 9000 Firmware, Sonicwall Email Security Virtual Appliance, Sonicwall Hosted Email Security.

## How do I fix CVE-2021-20021?

No fix has been published for CVE-2021-20021 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 17 Nov 2021.

## Is CVE-2021-20021 being exploited?

Yes. Attackers have exploited CVE-2021-20021 in the wild since at least 3 Nov 2021, including in ransomware campaigns.

Public exploit code:

- https://github.com/SUPRAAA-1337/CVE-2021-20021 (github_poc): https://github.com/SUPRAAA-1337/CVE-2021-20021
- SonicWall Email Security <= 10.0.9.x - Unauthenticated Admin Account Creation (nuclei): http/cves/2021/CVE-2021-20021.yaml

## Other vulnerabilities in SonicWall Email Security

- [CVE-2021-20022](https://insights.sbomify.com/CVE-2021-20022/): SonicWall Email Security Unrestricted Upload of File (high 7.2, exploited in the wild)
- [CVE-2021-20023](https://insights.sbomify.com/CVE-2021-20023/): SonicWall Email Security Path Traversal (medium 4.9, exploited in the wild)
- [CVE-2023-0655](https://insights.sbomify.com/CVE-2023-0655/): Information disclosure in SonicWall Email Security (medium 5.3)
- [CVE-2026-3468](https://insights.sbomify.com/CVE-2026-3468/): Cross-site scripting in Email Security (medium 4.8)
- [CVE-2026-3470](https://insights.sbomify.com/CVE-2026-3470/): Other in Email Security (low 3.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-20021 and fix it if it is affected.

What it is: CVE-2021-20021 is a critical vulnerability in SonicWall Email Security, published on 9 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-20021 in the wild since at least 3 Nov 2021, including in ransomware campaigns.

Affected product: SonicWall Email Security. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-20021/ (Markdown: https://insights.sbomify.com/CVE-2021-20021/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-20021
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-20021
- OSV: https://osv.dev/vulnerability/CVE-2021-20021

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-20021/
Summaries are generated and may contain mistakes; the official description above is the record.
