CVE-2021-31542
mediumpriority · track · 32EPSS 0.053 · 93 %ileDEEURUUSEPSS · scored 2026-10-27
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.
remediations
Vendor fix, mitigation, or workaround guidance, as published by each source.
A vendor fix is available.
- Fixedpython-django20-0:2.0.13-16.el8ost.1.src as a component of Red Hat OpenStack Platform 16.1redhat_csaf
For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
https://access.redhat.com/errata/RHSA-2021:5070 - Fixedpython-django20-bash-completion-0:2.0.13-16.el8ost.1.noarch as a component of Red Hat OpenStack Platform 16.1redhat_csaf
For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
https://access.redhat.com/errata/RHSA-2021:5070 - Fixedpython3-django20-0:2.0.13-16.el8ost.1.noarch as a component of Red Hat OpenStack Platform 16.1redhat_csaf
For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
https://access.redhat.com/errata/RHSA-2021:5070 - Fixedpython312-Django6-0:6.0-1.1.aarch64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython312-Django6-0:6.0-1.1.ppc64le as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython312-Django6-0:6.0-1.1.s390x as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython312-Django6-0:6.0-1.1.x86_64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython313-Django6-0:6.0-1.1.aarch64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython313-Django6-0:6.0-1.1.ppc64le as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython313-Django6-0:6.0-1.1.s390x as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Fixedpython313-Django6-0:6.0-1.1.x86_64 as component of openSUSE Tumbleweedsuse_csaf
To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
- Workaroundpython-django20-0:2.0.13-16.el8ost.1.src as a component of Red Hat OpenStack Platform 16.1redhat_csaf
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
- Workaroundpython-django20-bash-completion-0:2.0.13-16.el8ost.1.noarch as a component of Red Hat OpenStack Platform 16.1redhat_csaf
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
- Workaroundpython3-django20-0:2.0.13-16.el8ost.1.noarch as a component of Red Hat OpenStack Platform 16.1redhat_csaf
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 5–7.5
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (28)
Products and version ranges known to be affected.
advisories (5)
Vendor and ecosystem advisories describing this.
- RHSA-2021:5070Red Hat Security Advisory: Red Hat OpenStack Platform 16.1 (python-django20) security update2021-12-09csaf · redhat_csafUS
An update for python-django20 is now available for Red Hat OpenStack Platform 16.1 (Train). Red Hat Product Security has rated this update as having a security impact of Moderate. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.
- openSUSE-SU-2026:10005-1python312-Django6-6.0-1.1 on GA media2026-01-03csaf · suse_csafDE
python312-Django6-6.0-1.1 on GA media
- GHSA-rxjp-mfm9-w4wrPath Traversal in Django2021-06-04ghsa · osvUS
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.
- BIT-django-2021-315422024-03-06vendor · osvUS
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.
- PYSEC-2021-72021-05-05vendor · osvUS
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.
also known as (8)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (46)
External citations — patches, advisories, analysis.
- http://www.openwall.com/lists/oss-security/2021/05/04/3cnnvd
- https://access.redhat.com/security/cve/cve-2021-31542cnnvd
- https://docs.djangoproject.com/en/3.2/releases/security/cnnvd
- https://groups.google.com/forum/#!forum/django-announcecnnvd
- https://lists.debian.org/debian-lts-announce/2021/05/msg00005.htmlcnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/cnnvd
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/cnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-31542cnnvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan