Live threats

All CVEs / Djangoproject

CVE-2021-33203Djangoproject Django

Medium 4.9

Priority
30
CVSS 3.1
4.9
EPSS
2.5%
probability of exploitation in 30 days · percentile 85
Auth required
Yes
Published
Jun 8, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-22
Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

What happens

Django before 2.2.24, 3.x before 3.1.12, and 3.2.x before 3.2.4 has a potential directory traversal via django.contrib.admindocs. Staff members could use the TemplateDetailView view to check the existence of arbitrary files. Additionally, if (and only if) the default admindocs templates have been customized by application developers to also show file contents, then not only the existence but also the file contents would have been exposed. In other words, there is directory traversal outside of the template root directories.

Original NVD text.

What to do

  1. Apply the vendor's security update for Django.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI django < 2.2.24 2.2.24 pip install "django>=2.2.24"
PyPI django ≥ 3.0 < 3.1.12 3.1.12 pip install "django>=3.1.12"
PyPI django ≥ 3.2 < 3.2.4 3.2.4 pip install "django>=3.2.4"
PyPI django < 2.2.24 2.2.24 pip install "django>=2.2.24"
PyPI django ≥ 3.0 < 3.1.12 3.1.12 pip install "django>=3.1.12"
PyPI django ≥ 3.2 < 3.2.4 3.2.4 pip install "django>=3.2.4"

Per OSV / GitHub Advisories (GHSA-68w8-qjq3-2gfm, PYSEC-2021-98). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
djangoprojectdjango< 2.2.24
djangoprojectdjango≥ 3.0.0 < 3.1.12
djangoprojectdjango≥ 3.2.0 < 3.2.4
fedoraprojectfedora35

Official advisories

Also: SUSE (+1)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.