Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-33203
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:23 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-33203
Complete source record
{
"id": "e49085819ba93e8f8a2754256836d907eb70a485cc0bcf03f102ae70f92c702e",
"url": "https://osv.dev/vulnerability/CVE-2021-33203",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-33203",
"summary": "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.",
"evidence": "osv:CVE-2021-33203",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-33203",
"aliases": [
"BIT-django-2021-33203",
"CVE-2021-33203",
"GHSA-68w8-qjq3-2gfm",
"PYSEC-2021-98"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/django/django",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "2da029d8540ab0b2e9edcba25c4d46c52853197f"
},
{
"fixed": "625d3c1c643b0eb5c84339415ca0ba9f1728efa2"
},
{
"fixed": "843c34b3ab921c1acf77ee2014a97bc7975595b8"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.2.24"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.12"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "3.2.0"
},
{
"fixed": "3.2.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"2.2.23",
"3.1.11",
"3.2.3",
"2.2.22",
"3.1.10",
"3.2.2",
"3.2.1",
"3.1.9",
"2.2.21",
"3.2",
"2.2.20",
"3.1.8",
"3.2rc1",
"3.2b1",
"2.2.19",
"3.1.7",
"2.2.18",
"3.1.6",
"3.2a1",
"3.1.5",
"3.1.4",
"3.1.3",
"2.2.17",
"3.1.2",
"2.2.16",
"3.1.1",
"3.1",
"2.2.15",
"3.1rc1",
"2.2.14",
"3.1b1",
"2.2.13",
"3.1a1",
"2.2.12",
"2.2.11",
"2.2.10",
"2.2.9",
"2.2.8",
"2.2.7",
"2.2.6",
"2.2.5",
"2.2.4",
"2.2.3",
"2.2.2",
"2.2.1",
"2.2",
"2.2rc1",
"2.2b1",
"2.2a1",
"1.7a2",
"1.4",
"1.3",
"1.2.1",
"1.2",
"1.1",
"1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-33203.json"
}
}
],
"modified": "2026-10-24T10:30:52.634433023Z",
"provider": "osv",
"references": [
"https://groups.google.com/forum/#%21forum/django-announce",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/",
"https://security.netapp.com/advisory/ntap-20210727-0004/",
"https://docs.djangoproject.com/en/3.2/releases/security/",
"https://www.djangoproject.com/weblog/2021/jun/02/security-releases/"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*"
],
"vendor_product": "fedoraproject:fedora",
"extracted_events": [
{
"range": [
{
"introduced": "35"
},
{
"last_affected": "35"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-33203",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 437749,
"published_at": "2021-06-08T18:15:08.48+00:00"
}