# CVE-2021-20022: SonicWall Email Security Unrestricted Upload of File

> A post-authenticated attacker can upload arbitrary files to the SonicWall Email Security server, potentially leading to remote code execution.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:H/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:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 9 Apr 2021
- **Updated:** 1 Oct 2026
- **Also known as:** GHSA-5f56-r8q7-xv26

## What is CVE-2021-20022?

CVE-2021-20022 is a high-severity vulnerability in SonicWall Email Security, published on 9 Apr 2021. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

SonicWall Email Security version 10.0.9.x contains a vulnerability that allows a post-authenticated attacker to upload an arbitrary file to the remote host.

Weakness: CWE-434 (Unrestricted Upload of File with Dangerous Type)

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

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-20022?

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

## Is CVE-2021-20022 being exploited?

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

## Other vulnerabilities in SonicWall Email Security

- [CVE-2021-20021](https://insights.sbomify.com/CVE-2021-20021/): SonicWall Email Security Improper Privilege Management (critical 9.8, 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-20022 and fix it if it is affected.

What it is: CVE-2021-20022 is a high-severity vulnerability in SonicWall Email Security, published on 9 Apr 2021. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-20022 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-20022/ (Markdown: https://insights.sbomify.com/CVE-2021-20022/index.md)
```

## Sources

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

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