# CVE-2021-28658: Directory Traversal in Django

- Severity: Medium 5.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.37%, higher than 89% of CVEs (2026-12-01)
- Published: 2021-04-06T14:51:43.000Z
- Modified: 2026-09-08T08:46:25.545Z
- Also known as: GHSA-xgxc-v2qg-chmh, BIT-DJANGO-2021-28658, PYSEC-2021-6
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

In Django 2.2 before 2.2.20, 3.0 before 3.0.14, and 3.1 before 3.1.8, MultiPartParser allowed directory traversal via uploaded files with suitably crafted file names. Built-in upload handlers were not affected by this vulnerability.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- django (PyPI): from 2.2a1 before 2.2.20; from 3.0a1 before 3.0.14; from 3.1a1 before 3.1.8; from 2.2 before 2.2.20; from 3.0 before 3.0.14; from 3.1 before 3.1.8
- djangoproject django: from 2.2 before 2.2.20; from 3.0 before 3.0.14; from 3.1 before 3.1.8
- debian debian_linux: 9.0
- fedoraproject fedora: 34
- django (Bitnami): from 2.2.0 before 2.2.20; from 3.0.0 before 3.0.14; from 3.1.0 before 3.1.8

## Every score

- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://docs.djangoproject.com/en/3.1/releases/security/> (advisory, vendor-advisory, web)
- <https://groups.google.com/g/django-announce/c/ePr5j-ngdPU> (advisory, mailing-list, third-party-advisory, web)
- <https://www.djangoproject.com/weblog/2021/apr/06/security-releases/> (advisory, article, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2021/04/msg00008.html> (advisory, mailing-list, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/> (vendor-advisory, web)
- <https://security.netapp.com/advisory/ntap-20210528-0001/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-28658> (advisory, web)
- <https://docs.djangoproject.com/en/3.1/releases/security> (web)
- <https://github.com/advisories/GHSA-xgxc-v2qg-chmh> (advisory)
- <https://github.com/django/django> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-6.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE> (web)
- <https://pypi.org/project/Django> (web)
- <https://security.netapp.com/advisory/ntap-20210528-0001> (web)
- <https://www.djangoproject.com/weblog/2021/apr/06/security-releases> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/> (web)

## Sources

- CVE List: [CVE-2021-28658](https://www.cve.org/CVERecord?id=CVE-2021-28658), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-xgxc-v2qg-chmh](https://github.com/advisories/GHSA-xgxc-v2qg-chmh), CC-BY-4.0, modified 2024-09-20
- NVD: [CVE-2021-28658](https://nvd.nist.gov/vuln/detail/CVE-2021-28658), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-6](https://osv.dev/vulnerability/PYSEC-2021-6), CC-BY-4.0, modified 2023-12-06
- Bitnami Vulnerability Database: [BIT-DJANGO-2021-28658](https://osv.dev/vulnerability/BIT-DJANGO-2021-28658), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-28658 · Whole record: https://cve.day/CVE-2021-28658.json · Rebuilt by cve.day 2026-11-25T22:58:00.649Z
