CVE-2021-3281 json
Django Directory Traversal via archive.extract
published 5y ago modified 2mo ago also BIT-django-2021-3281 , EUVD-2021-0066 , GHSA-fvgf-6h6h-3322 , PYSEC-2021-9
- cvss
- 5.3
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 7.6%
- EPSS 7.6% chance of exploitation in 30 days, percentile 94%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi django 2.2.18, 3.0.12, 3.1.6
- bitnami django 2.2.18, 3.0.12, 3.1.6
- djangoproject django 2.2.18, 3.0.12, 3.1.6
- python-django Debian 14, Debian 13, Debian 12 2:2.2.18-1
debian advisories DEBIAN-CVE-2021-3281
- python-django Ubuntu 16.04 LTS 1.8.7-1ubuntu5.14
- python-django Ubuntu 18.04 LTS 1:1.11.11-1ubuntu1.10
- python-django Ubuntu 20.04 LTS 2:2.2.12-1ubuntu0.3
- python-django Ubuntu Pro 14.04 LTS 1.6.11-0ubuntu1.3+esm2
ubuntu advisories UBUNTU-CVE-2021-3281
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-django20 openstack 16.2, openstack 16.1 2.0.13-16.el8ost.1
- python3-django20 openstack 16.2, openstack 16.1 2.0.13-16.el8ost.1
- python-django20-bash-completion openstack 16.1 2.0.13-16.el8ost.1
- python-bleach ansible automation platform 4.2 3.3.0-1.el7pc
- python-bleach ansible automation platform 4.2 3.3.0-1.el8pc
- automation-hub ansible automation platform 4.2 4.2.2-1.el7pc
- automation-hub ansible automation platform 4.2 4.2.2-1.el8pc
- python3-bleach ansible automation platform 4.2 3.3.0-1.el7pc
red hat advisories RHSA-2021:5070RHSA-2021:3490RHSA-2021:0781
- rubygem-activerecord-session_store OpenStack Cloud 7 0.1.2-3.4.2
- kibana OpenStack Cloud 7 4.6.6-9.2
- grafana OpenStack Cloud 7 6.7.4-1.24.2
- python-py OpenStack Cloud 7 1.8.1-11.16.2
- python-Django OpenStack Cloud 7 1.8.19-3.29.1
- crowbar-openstack OpenStack Cloud 7 4.0+git.1616146720.44daffca0-9.81.2
- monasca-installer OpenStack Cloud 7 20180608_12.47-16.2
- kibana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 4.6.3-4.6.1
suse advisories SUSE-SU-2021:1963-1SUSE-RU-2021:0497-1SUSE-RU-2021:0351-1
- py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 +9 more 3.1.6-r0
alpine advisories ALPINE-CVE-2021-3281
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-django Arch Linux 3.1.6-1
arch linux advisories AVG-1518
Is CVE-2021-3281 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-3281 updated cvss 5.3
django: Potential directory-traversal via archive.extract()
-
Red Hat Ansible Automation Platform 1.2 python-djangoaffected: no fix available
-
Red Hat Ceph Storage 2 python-django, python-django-bash-completionaffected: no fix planned “Out of support scope”
-
Red Hat Ceph Storage 3 python-django, python-django-bash-completionaffected: no fix planned “Will not fix”
-
Red Hat OpenStack Platform 10 (Newton) python-django, python-django-bash-completionaffected: no fix planned “Out of support scope”
-
Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completionaffected: no fix planned “Will not fix”
-
Red Hat Satellite 6 python-django, python2-django, python-django-bash-completionaffected: no fix available
-
Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-djangoaffected: no fix available “Fix deferred”
-
Red Hat Ansible Tower 3.8 for RHEL 7 ansible-tower-38/ansible-tower-rhel7 3.8.2-1, ansible-tower-38/ansible-runner-rhel7 1.4.7-1fixed: vendor fix RHSA-2021:0780
show 4 moreshow fewer
-
Red Hat Automation Hub 4.2 for RHEL 7 python-bleach 3.3.0-1.el7pc, automation-hub 4.2.2-1.el7pc, python3-bleach 3.3.0-1.el7pc, python3-django 2.2.18-1.el7pc, python-galaxy-ng 4.2.2-1.el7pc, python3-galaxy-ng 4.2.2-1.el7pc, +6 more Red Hat Automation Hub 4.2 for RHEL 8 python-bleach 3.3.0-1.el8pc, automation-hub 4.2.2-1.el8pc, python3-bleach 3.3.0-1.el8pc, python3-django 2.2.18-1.el8pc, python-galaxy-ng 4.2.2-1.el8pc, python3-galaxy-ng 4.2.2-1.el8pc, +6 morefixed: vendor fix RHSA-2021:0781
-
Red Hat OpenStack Platform 16.1 python-django20 2.0.13-16.el8ost.1, python3-django20 2.0.13-16.el8ost.1, python-django20-bash-completion 2.0.13-16.el8ost.1fixed: vendor fix RHSA-2021:5070
-
Red Hat OpenStack Platform 16.2 python-django20 2.0.13-16.el8ost.1, python3-django20 2.0.13-16.el8ost.1fixed: vendor fix RHSA-2021:3490
-
Red Hat Ansible Tower 3 djangonot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
7.61% chance of exploitation in the next 30 days, higher than 94% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
| OSV | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | django | >=2.2, <2.2.18 >=3.1, <3.1.6 >=3.0, <3.0.12 |
2.2.18 3.1.6 3.0.12 |
| bitnami | django | >=2.2.0, <2.2.18 >=3.0.0, <3.0.12 >=3.1.0, <3.1.6 |
2.2.18 3.0.12 3.1.6 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
- Technology feeds
References
-
docs.djangoproject.com
/en/3.1/releases/security/
patch, vendor-advisory, advisory, web
-
github.com
/django/django/commit/02e6592835b4559909aa3aaaf67988fef435f624
web
-
github.com
/django/django/commit/05413afa8c18cdb978fcdf470e09f7a12b234a23
web
-
github.com
/django/django/commit/21e7622dec1f8612c85c2fc37fe8efbfd3311e37
web
-
github.com
/django/django/commit/52e409ed17287e9aabda847b6afe58be2fa9f86a
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO/
vendor-advisory, web
-
djangoproject.com
/weblog/2021/feb/01/security-releases/
vendor-advisory, advisory, article
-
groups.google.com
/forum/#%21forum/django-announce
web
-
security.netapp.com
/advisory/ntap-20210226-0004/
third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-3281
advisory, web
-
docs.djangoproject.com
/en/3.1/releases/3.0.12
web
-
docs.djangoproject.com
/en/3.1/releases/security
web
-
github.com
/advisories/GHSA-fvgf-6h6h-3322
advisory
-
github.com
/django/django
package
-
github.com
/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-9.yaml
web
-
groups.google.com
/forum/#!forum/django-announce
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO
web
-
security.netapp.com
/advisory/ntap-20210226-0004
web
-
djangoproject.com
/weblog/2021/feb/01/security-releases
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO/
web
Sources
- CVE List CVE-2021-3281
- GitHub Advisory GHSA-fvgf-6h6h-3322
- NVD CVE-2021-3281
- OSV BIT-django-2021-3281
- OSV PYSEC-2021-9
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.