{"id":"CVE-2021-31542","aliases":["CVE-2021-31542","GHSA-rxjp-mfm9-w4wr","BIT-DJANGO-2021-31542","PYSEC-2021-7"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal in Django","summary":"In Django 2.2 before 2.2.21, 3.1 before 3.1.9, and 3.2 before 3.2.1, MultiPartParser, UploadedFile, and FieldFile allowed directory traversal via uploaded files with suitably crafted file names.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Django 2.2 before 2.2.21, 3.1 before 3.1.9, and 3.2 before 3.2.1, MultiPartParser, UploadedFile, and FieldFile allowed directory traversal via uploaded files with suitably crafted file names.","source":"cvelist"},{"lang":"es","text":"En Django versiones 2.2 anteriores a 2.2.21, versiones 3.1 anteriores a 3.1.9 y versiones 3.2 anteriores a 3.2.1, MultiPartParser, UploadedFile y FieldFile, permitían un salto de directorio por medio de archivos cargados con nombres de archivo cuidadosamente diseñados","source":"nvd"}],"published":"2021-05-05T00:00:00.000Z","modified":"2026-09-08T08:46:24.848Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-22","CWE-434"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.21"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0","status":"affected","fixed":"3.1.9"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.1"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.2","fixed":"2.2.21"},{"status":"affected","introduced":"3.1","fixed":"3.1.9"},{"status":"affected","introduced":"3.2","fixed":"3.2.1"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"34"},{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.21"},{"type":"ecosystem","introduced":"3.1","status":"affected","fixed":"3.1.9"},{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.1"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.21"},{"type":"semver","introduced":"3.1.0","status":"affected","fixed":"3.1.9"},{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"3.2.1"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security/","tags":["advisory","patch","vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/04/3","tags":["advisory","mailing-list","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2021/may/04/security-releases/","tags":["advisory","article","release-notes","vendor-advisory","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/05/msg00005.html","tags":["advisory","mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20210618-0001/","tags":["advisory","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/django/django/commit/c98f446c188596d4ba6de71d1b77b4a6c5c2a007","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31542","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2021/may/04/security-releases","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20210618-0001","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-7.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-rxjp-mfm9-w4wr","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://docs.djangoproject.com/en/3.2/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-31542","url":"https://www.cve.org/CVERecord?id=CVE-2021-31542","licence":"CVE Terms of Use","modified":"2024-08-03T23:03:33.545Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rxjp-mfm9-w4wr","url":"https://github.com/advisories/GHSA-rxjp-mfm9-w4wr","licence":"CC-BY-4.0","modified":"2024-09-20T15:33:18.289Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-31542","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-31542","licence":"Public domain","modified":"2026-06-17T03:51:58.720Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-7","url":"https://osv.dev/vulnerability/PYSEC-2021-7","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:11.745Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2021-31542","url":"https://osv.dev/vulnerability/BIT-DJANGO-2021-31542","licence":"Apache-2.0","modified":"2026-09-08T08:46:24.848Z"}],"updatedAt":"2026-11-25T22:58:01.141Z","epss":{"score":0.04733,"percentile":0.92047,"date":"2026-12-01T12:00:22.000Z"}}