Skip to content
Fencer Vulns
medium 5.3

CVE-2021-3281 json

Django Directory Traversal via archive.extract

published 2021-02-02 5 y ago modified 2026-09-08 2 mo 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

Vendor 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-django
    affected: no fix available
  • Red Hat Ceph Storage 2 python-django, python-django-bash-completion
    affected: no fix planned “Out of support scope”
  • Red Hat Ceph Storage 3 python-django, python-django-bash-completion
    affected: no fix planned “Will not fix”
  • Red Hat OpenStack Platform 10 (Newton) python-django, python-django-bash-completion
    affected: no fix planned “Out of support scope”
  • Red Hat OpenStack Platform 13 (Queens) python-django, python2-django, python-django-bash-completion
    affected: no fix planned “Will not fix”
  • Red Hat Satellite 6 python-django, python2-django, python-django-bash-completion
    affected: no fix available
  • Red Hat Storage 3 python-django, python2-django, python-django-bash-completion Red Hat Update Infrastructure 3 for Cloud Providers python-django
    affected: 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-1
    fixed: vendor fix RHSA-2021:0780
show 4 more
  • 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 more
    fixed: 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.1
    fixed: 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.1
    fixed: vendor fix RHSA-2021:3490
  • Red Hat Ansible Tower 3 django
    not 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-08).

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

Sources

Fencer Vulns 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.