CVE-2021-31542
Aliases:GHSA-rxjp-mfm9-w4wrBIT-django-2021-31542PYSEC-2021-7
Advisory lineage Upstream: 0 Downstream: 16
Modified
Published: 05 May 2021, 00:00
Last modified:03 Aug 2024, 23:03
Vulnerability Summary
Overall Risk (default)
medium
31/100 CVSS Score
7.5 HIGH
v3.1 (nvd)
EPSS Score
4.36% LOW
4% probability -0.84%
KEV
Not listed
Ransomware
No reports
Public exploits
None found
Dark Web
Not detected
Timeline
05 May 2021, 00:00
Published
Vulnerability first disclosed
03 Aug 2024, 23:03
Last Modified
Vulnerability information updated
Description
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.
CVSS Metrics
- v4.0•HIGH•Score: 8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
- v3.1•HIGH•Score: 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- v2.0•MEDIUM•Score: 5AV:N/AC:L/Au:N/C:P/I:N/A:N
EPSS Trends
Current EPSS score: 4.36%• Percentile: 89%
Techniques & Countermeasures
- CWE-22•Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Affected Systems
- debian•debian_linux
9.0
- djangoproject•django
≥ 2.2, < 2.2.21 | ≥ 3.1, < 3.1.9 | ≥ 3.2, < 3.2.1
- fedoraproject•fedora
34 | 35
- PyPI•django
≥ 2.2, < 2.2.21 | ≥ 3.0, < 3.1.9 | ≥ 3.2, < 3.2.1
References (24)
- https://groups.google.com/forum/#%21forum/django-announce
- https://docs.djangoproject.com/en/3.2/releases/security/
- http://www.openwall.com/lists/oss-security/2021/05/04/3
- https://www.djangoproject.com/weblog/2021/may/04/security-releases/
- https://lists.debian.org/debian-lts-announce/2021/05/msg00005.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/
- https://security.netapp.com/advisory/ntap-20210618-0001/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/
- https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26d
- https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48
- https://github.com/django/django/commit/c98f446c188596d4ba6de71d1b77b4a6c5c2a007
- https://nvd.nist.gov/vuln/detail/CVE-2021-31542
- https://www.djangoproject.com/weblog/2021/may/04/security-releases
- https://security.netapp.com/advisory/ntap-20210618-0001
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- https://groups.google.com/forum/#!forum/django-announce
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-7.yaml
- https://github.com/django/django
- https://github.com/advisories/GHSA-rxjp-mfm9-w4wr
- https://docs.djangoproject.com/en/3.2/releases/security
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUE/