CVE-2021-3281Djangoproject Django
Medium 5.3 No auth needed
Follow: this CVE · Djangoproject · Djangoproject Django We alert you by email or Slack (account required).
- Priority
- 48
- CVSS 3.1
- 5.3
- EPSS
- 7.6% probability of exploitation in 30 days · percentile 95
- Auth required
- No
- Published
- Feb 2, 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:N/I:L/A:N
What happens
In Django 2.2 before 2.2.18, 3.0 before 3.0.12, and 3.1 before 3.1.6, the django.utils.archive.extract method (used by "startapp --template" and "startproject --template") allows directory traversal via an archive with absolute paths or relative paths with dot segments.
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.2 < 2.2.18 |
2.2.18 |
pip install "django>=2.2.18" |
| PyPI | django |
≥ 3.1 < 3.1.6 |
3.1.6 |
pip install "django>=3.1.6" |
| PyPI | django |
≥ 3.0 < 3.0.12 |
3.0.12 |
pip install "django>=3.0.12" |
| PyPI | django |
≥ 2.2 < 2.2.18 |
2.2.18 |
pip install "django>=2.2.18" |
| PyPI | django |
≥ 3.0 < 3.0.12 |
3.0.12 |
pip install "django>=3.0.12" |
| PyPI | django |
≥ 3.1 < 3.1.6 |
3.1.6 |
pip install "django>=3.1.6" |
Per OSV / GitHub Advisories (GHSA-fvgf-6h6h-3322, PYSEC-2021-9). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | django | ≥ 2.2 < 2.2.18 |
| djangoproject | django | ≥ 3.0 < 3.0.12 |
| djangoproject | django | ≥ 3.1 < 3.1.6 |
| fedoraproject | fedora | 33 |
| netapp | snapcenter | all |
Official sources
References
Links published by the sources. Open them with care.
- docs.djangoproject.com Patch Vendor Advisory
- groups.google.com
- lists.fedoraproject.org
- security.netapp.com Third Party Advisory
- www.djangoproject.com Vendor Advisory