# CVE-2021-3281: Django Directory Traversal via archive.extract

- Severity: Medium 5.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 7.61%, higher than 94% of CVEs (2026-12-02)
- Published: 2021-02-02T06:16:28.000Z
- Modified: 2026-09-08T08:46:22.875Z
- Also known as: GHSA-fvgf-6h6h-3322, BIT-DJANGO-2021-3281, PYSEC-2021-9
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- django (PyPI): from 2.2 before 2.2.18; from 3.1 before 3.1.6; from 3.0 before 3.0.12
- djangoproject django: from 2.2 before 2.2.18; from 3.0 before 3.0.12; from 3.1 before 3.1.6
- fedoraproject fedora: 33
- netapp snapcenter: no versions given
- django (Bitnami): from 2.2.0 before 2.2.18; from 3.0.0 before 3.0.12; from 3.1.0 before 3.1.6

## Every score

- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:P/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://groups.google.com/forum/#%21forum/django-announce> (web)
- <https://docs.djangoproject.com/en/3.1/releases/security/> (advisory, patch, vendor-advisory, web)
- <https://www.djangoproject.com/weblog/2021/feb/01/security-releases/> (advisory, article, vendor-advisory)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO/> (vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210226-0004/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3281> (advisory, web)
- <https://github.com/django/django/commit/02e6592835b4559909aa3aaaf67988fef435f624> (web)
- <https://github.com/django/django/commit/05413afa8c18cdb978fcdf470e09f7a12b234a23> (web)
- <https://github.com/django/django/commit/21e7622dec1f8612c85c2fc37fe8efbfd3311e37> (web)
- <https://github.com/django/django/commit/52e409ed17287e9aabda847b6afe58be2fa9f86a> (web)
- <https://docs.djangoproject.com/en/3.1/releases/3.0.12> (web)
- <https://docs.djangoproject.com/en/3.1/releases/security> (web)
- <https://github.com/advisories/GHSA-fvgf-6h6h-3322> (advisory)
- <https://github.com/django/django> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-9.yaml> (web)
- <https://groups.google.com/forum/#!forum/django-announce> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO> (web)
- <https://security.netapp.com/advisory/ntap-20210226-0004> (web)
- <https://www.djangoproject.com/weblog/2021/feb/01/security-releases> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOO/> (web)

## Sources

- CVE List: [CVE-2021-3281](https://www.cve.org/CVERecord?id=CVE-2021-3281), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-fvgf-6h6h-3322](https://github.com/advisories/GHSA-fvgf-6h6h-3322), CC-BY-4.0, modified 2024-09-20
- NVD: [CVE-2021-3281](https://nvd.nist.gov/vuln/detail/CVE-2021-3281), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-9](https://osv.dev/vulnerability/PYSEC-2021-9), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-DJANGO-2021-3281](https://osv.dev/vulnerability/BIT-DJANGO-2021-3281), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-3281 · Whole record: https://cve.day/CVE-2021-3281.json · Rebuilt by cve.day 2026-11-25T22:57:59.773Z
