GHSA-rxjp-mfm9-w4wr
HIGH
Path Traversal in Django
Published June 4, 2021Updated September 20, 2024Source: osv
Details
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.
Remediation
Upgrade to the fixed version using your package manager.
pip
Update django to 3.2.1 or laterpip install "django>=3.2.1"
pip
Update django to 2.2.21 or laterpip install "django>=2.2.21"
pip
Update django to 3.1.9 or laterpip install "django>=3.1.9"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (3)
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-31542ADVISORY
- https://github.com/django/django/commit/04ac1624bdc2fa737188401757cf95ced122d26dWEB
- https://github.com/django/django/commit/25d84d64122c15050a0ee739e859f22ddab5ac48WEB
- https://github.com/django/django/commit/c98f446c188596d4ba6de71d1b77b4a6c5c2a007WEB
- https://www.djangoproject.com/weblog/2021/may/04/security-releasesWEB
- https://security.netapp.com/advisory/ntap-20210618-0001WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUEWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDVWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZVKYPHR3TKR2ESWXBPOJEKRO2OSJRZUEWEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDVWEB
- https://lists.debian.org/debian-lts-announce/2021/05/msg00005.htmlWEB
- https://groups.google.com/forum/#%21forum/django-announceWEB
- https://groups.google.com/forum/#!forum/django-announceWEB
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2021-7.yamlWEB
- https://github.com/django/djangoPACKAGE
- https://github.com/advisories/GHSA-rxjp-mfm9-w4wrADVISORY
- https://docs.djangoproject.com/en/3.2/releases/securityWEB
- http://www.openwall.com/lists/oss-security/2021/05/04/3WEB
Risk Assessment
CVSS Score
3.1
Exploitation is difficult or impact is minor. Address in your next planned update.
EPSS Score (30-day exploit probability)
6.38%
Higher than 91% of vulnerabilities
Also Known As
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies