CVE-2021-3281 — Vulnerability in django — CVE Details
Django Directory Traversal via archive.extract
What Should I Do?
Fix Within 2-4 Weeks
Moderate exploitation risk (36.23% probability in 30 days). Schedule remediation soon.
Summary
Advisory Timeline
- First published March 18, 2021 (2034 days ago).
- Last revised September 20, 2024 — 1282 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "django>=2.2.18"
pip install "django>=3.1.6"
pip install "django>=3.0.12"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 1 ecosystem: pypi (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-22Path TraversalMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.3 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-3281ADVISORY
- https://github.com/django/django/commit/02e6592835b4559909aa3aaaf67988fef435f624WEB
- https://github.com/django/django/commit/05413afa8c18cdb978fcdf470e09f7a12b234a23WEB
- https://github.com/django/django/commit/21e7622dec1f8612c85c2fc37fe8efbfd3311e37WEB
- https://github.com/django/django/commit/52e409ed17287e9aabda847b6afe58be2fa9f86aWEB
- https://docs.djangoproject.com/en/3.1/releases/3.0.12WEB
- https://docs.djangoproject.com/en/3.1/releases/securityWEB
- https://github.com/advisories/GHSA-fvgf-6h6h-3322ADVISORY
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-9.yamlWEB
- https://groups.google.com/forum/#!forum/django-announceWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YF52FKEH5S2P5CM4X7IXSYG67YY2CDOOWEB
- https://security.netapp.com/advisory/ntap-20210226-0004WEB
- https://www.djangoproject.com/weblog/2021/feb/01/security-releasesWEB
Frequently Asked Questions
- What is CVE-2021-3281?
- Django Directory Traversal via archive.extract This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.3/10).
- How do I check if my project is affected by CVE-2021-3281?
- CVE-2021-3281 affects django. It has a 36.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-3281 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions or has limited impact. Remediate within weeks.
This places it in the top 5% of EPSS-scored vulnerabilities — 97% of tracked vulnerabilities score at or below it, so it is far more likely to be exploited than nearly all other tracked vulnerabilities.
Also Known As
Related CVEs
- CVE-2022-23833HIGH
Infinite Loop in Django
- CVE-2025-57833HIGH
Django is subject to SQL injection through its column aliases
- CVE-2021-45116HIGH
Information disclosure in Django
- CVE-2025-48432MEDIUM
Django Improper Output Neutralization for Logs vulnerability
- CVE-2021-31542
- CVE-2021-32052
- CVE-2021-33203
- CVE-2021-33571
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies