CVE-2021-28658Djangoproject Django
Medium 5.3 No auth needed
Follow: this CVE · Djangoproject · Djangoproject Django We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 3.1
- 5.3
- EPSS
- 3.4% probability of exploitation in 30 days · percentile 90
- Auth required
- No
- Published
- Apr 6, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Django.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | django |
≥ 2.2a1 < 2.2.20 |
2.2.20 |
pip install "django>=2.2.20" |
| PyPI | django |
≥ 3.0a1 < 3.0.14 |
3.0.14 |
pip install "django>=3.0.14" |
| PyPI | django |
≥ 3.1a1 < 3.1.8 |
3.1.8 |
pip install "django>=3.1.8" |
| PyPI | django |
≥ 2.2 < 2.2.20 |
2.2.20 |
pip install "django>=2.2.20" |
| PyPI | django |
≥ 3.0 < 3.0.14 |
3.0.14 |
pip install "django>=3.0.14" |
| PyPI | django |
≥ 3.1 < 3.1.8 |
3.1.8 |
pip install "django>=3.1.8" |
Per OSV / GitHub Advisories (GHSA-xgxc-v2qg-chmh, PYSEC-2021-6). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | django | ≥ 2.2 < 2.2.20 |
| djangoproject | django | ≥ 3.0 < 3.0.14 |
| djangoproject | django | ≥ 3.1 < 3.1.8 |
| debian | debian_linux | 9.0 |
| fedoraproject | fedora | 34 |
Official sources
References
Links published by the sources. Open them with care.
- docs.djangoproject.com Vendor Advisory
- groups.google.com Mailing List Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- security.netapp.com Third Party Advisory
- www.djangoproject.com Vendor Advisory