Path traversal in Django - CVE-2021-28658

 

Path traversal in Django - CVE-2021-28658

Published: April 6, 2021


Vulnerability identifier: #VU51936
CSH Severity: Medium
CVSS v4: 8.7 [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]
CVE-ID: CVE-2021-28658
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences in MultiPartParser. A remote attacker can use a specially crafted files with suitably crafted file names and read arbitrary files on the system.


Affected software

Django
Gentoo Linux
Ubuntu
Fedora
python3-django (Ubuntu package)
python-django (Ubuntu package)
python-django20 (Red Hat package)
python-django
python-django3
dev-python/django
Red Hat OpenStack

How to mitigate CVE-2021-28658

Install update from vendor's website.

Django - addressed in versions 2.2.20, 3.0.14, 3.1.8
python3-django (Ubuntu package) - addressed in versions 1.8.7-1ubuntu5.15, 1:1.11.11-1ubuntu1.12, 2:2.2.12-1ubuntu0.5, 2:2.2.16-1ubuntu0.3
python-django (Ubuntu package) - addressed in versions 1.8.7-1ubuntu5.15, 1:1.11.11-1ubuntu1.12
python-django20 (Red Hat package) - update to 2.0.13-16.el8ost.1
python-django - update to 3.1.9-1.fc34
python-django3 - update to 3.2.15-1.fc38
dev-python/django - update to 5.2.1
Red Hat OpenStack - update to 16.1

External References

Related Security Bulletins