Live threats

All CVEs / Djangoproject

CVE-2021-3281Djangoproject Django

Medium 5.3 No auth needed

Priority
48
CVSS 3.1
5.3
EPSS
7.6%
probability of exploitation in 30 days · percentile 95
Auth required
No
Published
Feb 2, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Django.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI django ≥ 2.2 < 2.2.18 2.2.18 pip install "django>=2.2.18"
PyPI django ≥ 3.1 < 3.1.6 3.1.6 pip install "django>=3.1.6"
PyPI django ≥ 3.0 < 3.0.12 3.0.12 pip install "django>=3.0.12"
PyPI django ≥ 2.2 < 2.2.18 2.2.18 pip install "django>=2.2.18"
PyPI django ≥ 3.0 < 3.0.12 3.0.12 pip install "django>=3.0.12"
PyPI django ≥ 3.1 < 3.1.6 3.1.6 pip install "django>=3.1.6"

Per OSV / GitHub Advisories (GHSA-fvgf-6h6h-3322, PYSEC-2021-9). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
djangoprojectdjango≥ 2.2 < 2.2.18
djangoprojectdjango≥ 3.0 < 3.0.12
djangoprojectdjango≥ 3.1 < 3.1.6
fedoraprojectfedora33
netappsnapcenterall

Official sources

References

Links published by the sources. Open them with care.