VDB

CVE-2021-3281

CVE-2021-3281 PUBLISHED CVSS 5.300000190734863 MEDIUM

Django Directory Traversal via archive.extract

Reported by mitre · Published February 2, 2021

Django is fixed in 3.1.6, 3.0.12 and 2.2.18 (PyPI)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
DjangoPyPI3.1.6, 3.0.12, 2.2.18
djangodjangoproject3.1.6, 3.0.12, 2.2.18
python-djangoUbuntu:16.04:LTS1.8.7-1ubuntu5.14

Risk scores

CVSS 3.1
5.300000190734863
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected products

VendorProductVersions
n/an/an/a
n/an/a*
archpython-django0
PyPIDjango2.2, 3.1, 3.0
alpinepy3-django0

Timeline

  • Feb 2, 2021 CVE Published
  • Apr 14, 2021 EPSS Score (30 in total, the first dated here)
  • Nov 21, 2025 PoC Published
  • Mar 7, 2026 Distribution Patch (8 in total, the first dated here)
  • Mar 7, 2026 Security Advisory (12 in total, the first dated here)
  • Aug 1, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-3281
vulnetix vdb fixes CVE-2021-3281

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-3281/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›