CVE-2021-28658 Directory Traversal in Django
Attackers can exploit directory traversal in Django's MultiPartParser to read or modify files via crafted filenames, requiring an upgrade to secure versions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-28658?
CVE-2021-28658 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 6 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In Django 2.2 before 2.2.20, 3.0 before 3.0.14, and 3.1 before 3.1.8, MultiPartParser allowed directory traversal via uploaded files with suitably crafted file names. Built-in upload handlers were not affected by this vulnerability.
Weakness: CWE-22
Which versions are affected by CVE-2021-28658?
8 open source packages ship an affected version, including django and Django. It affects 3 products.
| Package | Affected | Fixed in |
|---|---|---|
django Bitnami | From 2.2.0 | 2.2.20, 3.0.14, 3.1.8 |
django PyPI | From 2.2 | 2.2.20, 3.0.14, 3.1.8 |
django PyPI | From 2.2a1 | 2.2.20 |
django PyPI | From 3.0a1 | 3.0.14 |
django PyPI | From 3.1a1 | 3.1.8 |
Django PyPI | From 2.2a1 | 2.2.20 |
2 more packages
Django PyPI | From 3.0a1 | 3.0.14 |
Django PyPI | From 3.1a1 | 3.1.8 |
Products include Debian Debian Linux, Djangoproject Django, Fedoraproject Fedora.
How do I fix CVE-2021-28658?
Upgrade django to a fixed version for your release line: 2.2.20, 3.0.14 or 3.1.8.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-28658 being exploited?
There is no known exploitation of CVE-2021-28658 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BIT-django-2021-28658, DEBIAN-CVE-2021-28658, DLA-2622-1, GHSA-xgxc-v2qg-chmh, PYSEC-2021-6, UBUNTU-CVE-2021-28658 and 1 more.