# CVE-2021-40870: Aviatrix Controller Unrestricted Upload of File

> Unauthenticated attackers can upload malicious files to execute arbitrary code on the Aviatrix Controller via directory traversal.

- **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 18 Jan 2022 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 13 Sep 2021
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-w7mg-q4hh-m9cq

## What is CVE-2021-40870?

CVE-2021-40870 is a critical vulnerability in n/a, published on 13 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in Aviatrix Controller 6.x before 6.5-1804.1922. Unrestricted upload of a file with a dangerous type is possible, which allows an unauthenticated user to execute arbitrary code via directory traversal.

Weakness: CWE-23 (Relative Path Traversal)

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

It affects 1 product.


Products: Aviatrix Controller.

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

No fix has been published for CVE-2021-40870 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 1 Feb 2022.

## Is CVE-2021-40870 being exploited?

Yes. Attackers have exploited CVE-2021-40870 in the wild since at least 18 Jan 2022.

Public exploit code:

- Aviatrix Controller 6.x before 6.5-1804.1922. Unrestricted upload of a file which allows an unauthenticated user to execute arbitrary code via directory traversal (github_poc): https://github.com/0xAgun/CVE-2021-40870
- Aviatrix allows an authenticated user to execute arbitrary code (github_poc): https://github.com/orangmuda/CVE-2021-40870
- Unrestricted upload of file with dangerous type in Aviatrix allows an authenticated user to execute arbitrary code (github_poc): https://github.com/JoyGhoshs/CVE-2021-40870
- Unrestricted upload of file with dangerous type in Aviatrix allows an authenticated user to execute arbitrary code (github_poc): https://github.com/System00-Security/CVE-2021-40870
- Aviatrix Controller 6.x before 6.5-1804.1922 - Remote Command Execution (nuclei): http/cves/2021/CVE-2021-40870.yaml

## Other vulnerabilities in n/a

- [CVE-2024-50603](https://insights.sbomify.com/CVE-2024-50603/): Aviatrix Controllers OS Command Injection (critical 10.0, exploited in the wild)
- [CVE-2020-26553](https://insights.sbomify.com/CVE-2020-26553/): File upload in n/a (critical 9.8)
- [CVE-2020-13417](https://insights.sbomify.com/CVE-2020-13417/): Privilege escalation in n/a (critical 9.8)
- [CVE-2020-26548](https://insights.sbomify.com/CVE-2020-26548/): Privilege escalation in n/a (high 8.8)
- [CVE-2020-13412](https://insights.sbomify.com/CVE-2020-13412/): Cross-site request forgery in n/a (high 8.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-40870 is a critical vulnerability in n/a, published on 13 Sep 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-40870 in the wild since at least 18 Jan 2022.

Affected product: n/a. 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-40870/ (Markdown: https://insights.sbomify.com/CVE-2021-40870/index.md)
```

## Sources

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

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