Skip to main content
Public proof of conceptFix available

CVE-2021-3281

A public proof of concept exists; no exploitation attested.

  • Published2021-02-02
  • Fixed in3.1.6 · 3.0.12 · 2.2.18
  • WeaknessCWE-22

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2021-02-0207:15CVE publishedNVD
  2. 2026-10-2319:23First public proof of conceptPoC-in-GitHub

Versions per branch

NVD · OSV
Django
BranchAffectedFixed in
3.1≥ 3.1, < 3.1.63.1.6
3.1≥ 3.1.0, < 3.1.63.1.6
3.0≥ 3.0, < 3.0.123.0.12
3.0≥ 3.0.0, < 3.0.123.0.12
2.2≥ 2.2, < 2.2.182.2.18
2.2≥ 2.2.0, < 2.2.182.2.18
Fedoraproject fedora
BranchAffectedFixed in
33.x= 33no fix published
Netapp snapcenter
BranchAffectedFixed in
—all versionsno fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • ardana-dbSUSE:OpenStack Cloud 9all versions · fixed in 9.0+git.1611600773.5f1de5f-3.22.1
  • ardana-horizonSUSE:OpenStack Cloud 9all versions · fixed in 9.0+git.1610491814.38661c2-3.16.1
  • ardana-horizonSUSE:OpenStack Cloud 8all versions · fixed in 8.0+git.1610733160.0f577f4-3.21.1
  • ardana-horizonSUSE:HPE Helion OpenStack 8all versions · fixed in 8.0+git.1610733160.0f577f4-3.21.1
  • ardana-loggingSUSE:OpenStack Cloud 9all versions · fixed in 9.0+git.1610490922.d5f9813-3.16.1
  • ardana-loggingSUSE:OpenStack Cloud 8all versions · fixed in 8.0+git.1610573640.452aed1-3.27.1
  • ardana-loggingSUSE:HPE Helion OpenStack 8all versions · fixed in 8.0+git.1610573640.452aed1-3.27.1
  • ardana-monascaSUSE:OpenStack Cloud 9all versions · fixed in 9.0+git.1610547641.d79ecfd-3.22.1

102 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-3281 Red Hat Product Security33 products fixed · 21 known affected

    django: Potential directory-traversal via archive.extract()

    python-django.src as a component of Red Hat Ansible Automation Platform 1.2 · python-django-bash-completion as a component of Red Hat Ceph Storage 2 · python-django.src as a component of Red Hat Ceph Storage 2 · +18 more

  • RHSA-2021:5070 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Red Hat OpenStack Platform 16.1 (python-django20) security update

  • RHSA-2021:3490 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat OpenStack Platform 16.2 (python-django20) security update

  • RHSA-2021:0781 Red Hat Product Security26 products fixed

    Red Hat Security Advisory: Red Hat Ansible Automation Platform 1.2.2 security and bug fix update

  • RHSA-2021:0780 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Red Hat Ansible Tower 3.8.2-1 - Container security and bug fix update

Full record on NVD

Fix

  1. Update Django to 3.1.6 · 3.0.12 · 2.2.18
  2. Vendor fix Red Hat Product Security RHSA-2021:5070 · 3 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
  3. Vendor fix Red Hat Product Security RHSA-2021:0781 · 26 productsBefore applying this update, make sure all previously released errata relevant to your system have been applied. For details on how to apply this update, refer to: https://access.redhat.com/articles/11258
  4. Vendor fix Red Hat Product Security RHSA-2021:0780 · 2 productsFor information on upgrading Ansible Tower, reference the Ansible Tower Upgrade and Migration Guide: https://docs.ansible.com/ansible-tower/latest/html/upgrade-migration-guide/index.html
  5. No fix available, says the vendor Red Hat Product Security CVE-2021-3281 · 5 productsFix deferred
  6. No fix available, says the vendor Red Hat Product Security CVE-2021-3281 · 5 productsAffected
  7. No fix planned, says the vendor Red Hat Product Security CVE-2021-3281 · 6 productsOut of support scope

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Published
2021-02-02
Last modified
2026-06-17
NVD status
Modified
GitHub advisory
GHSA-fvgf-6h6h-3322

Frequently asked questions

What is CVE-2021-3281?

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.

Is CVE-2021-3281 actively exploited?

Active exploitation of CVE-2021-3281 has not been confirmed. Its EPSS score was 7.6% on 2026-12-04, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-3281?

CVE-2021-3281 has a CVSS v3 base score of 5.3 (Medium severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.

Running Django? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record