CVE-2021-33203
JSON

4.9medium

Path Traversal in Django

Severity
4.9medium CVSS:3.1 by NVD
Exploit likelihood
2.49% (higher than 85% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-68w8-qjq3-2gfmBIT-DJANGO-2021-33203PYSEC-2021-98

Description

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
django (PyPI)before 2.2.24, from 3.0 before 3.1.12, from 3.2 before 3.2.4GitHub Advisory Database, PyPA Advisory Database
djangoproject djangobefore 2.2.24, from 3.0.0 before 3.1.12, from 3.2.0 before 3.2.4NVD
fedoraproject fedora35NVD
django (Bitnami)before 2.2.24, from 3.0.0 before 3.1.12, from 3.2.0 before 3.2.4Bitnami Vulnerability Database

All scores

GitHub4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
NVD4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N
NVD4.0medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:N/A:N
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

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.

NVD (es)

Django versiones anteriores a 2.2.24, versiones 3.x anteriores a 3.1.12 y versiones 3.2.x anteriores a 3.2.4, presenta un potencial salto de directorio por medio de django.contrib.admindocs. Los miembros del personal podrían usar la visualización TemplateDetailView para comprobar la existencia de archivos arbitrarios. Adicionalmente, si (y sólo si) las plantillas admindocs por defecto han sido personalizadas por los desarrolladores de aplicaciones para mostrar también el contenido de los archivos, entonces no sólo se habría expuesto la existencia sino también el contenido de los archivos. En otras palabras, se presenta un salto de directorio fuera de los directorios root de las plantillas

References

https://groups.google.com/forum/#%21forum/django-announceweb
https://docs.djangoproject.com/en/3.2/releases/security/advisory, patch, vendor-advisory, web
https://www.djangoproject.com/weblog/2021/jun/02/security-releases/advisory, article, patch, vendor-advisory
https://security.netapp.com/advisory/ntap-20210727-0004/advisory, third-party-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/vendor-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-33203advisory, web
https://github.com/django/django/commit/053cc9534d174dc89daba36724ed2dcb36755b90web
https://github.com/django/django/commit/20c67a0693c4ede2b09af02574823485e82e4c8fweb
https://github.com/django/django/commit/dfaba12cda060b8b292ae1d271b44bf810b1c5b9web
https://docs.djangoproject.com/en/3.2/releases/securityweb
https://github.com/advisories/GHSA-68w8-qjq3-2gfmadvisory
https://github.com/django/djangopackage

Sources

SourceRecordLicence
CVE ListCVE-2021-33203 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-68w8-qjq3-2gfm changed 2024-09-20CC-BY-4.0
NVDCVE-2021-33203 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-98 changed 2023-12-06CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2021-33203 changed 2026-09-08Apache-2.0