Arbitrary file upload in Django - CVE-2023-31047

 

Arbitrary file upload in Django - CVE-2023-31047

Published: May 3, 2023


Vulnerability identifier: #VU75707
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2023-31047
CWE-ID: CWE-434
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to compromise vulnerable system.

The vulnerability exists due to the application does not perform validation of files when using one form field for uploading multiple files. A remote attacker can upload a malicious file and execute it on the server.


Affected software

Django
Debian Linux
Red Hat Enterprise Linux for x86_64
Fedora
Oracle Solaris
Ubuntu
openSUSE Leap
openEuler
Red Hat Satellite
python3-django (Ubuntu package)
python-django-doc (Ubuntu package)
python-django (Ubuntu package)
yggdrasil-worker-forwarder (Red Hat package)
python-sqlparse (Red Hat package)
rubygem-foreman_maintain (Red Hat package)
pulpcore-selinux (Red Hat package)
rubygem-git (Red Hat package)
python3-Django
python-django
python-django-help
python-django (Debian package)
python-gitpython (Red Hat package)
python-django3
python-django (Red Hat package)
foreman (Red Hat package)
foreman-installer (Red Hat package)
python-pulpcore (Red Hat package)
rhui-installer (Red Hat package)
rhui-tools (Red Hat package)
rubygem-katello (Red Hat package)
satellite (Red Hat package)
rubygem-foreman_rh_cloud (Red Hat package)
puppet-agent (Red Hat package)
rubygem-foreman_theme_satellite (Red Hat package)
Cloud Pak for Network Automation

How to mitigate CVE-2023-31047

Install updates from vendor's website.

Django - addressed in versions 3.2.19, 4.1.9, 4.2.1
Red Hat Satellite - addressed in versions 6.13.5, 6.14
python3-django (Ubuntu package) - addressed in versions Ubuntu Pro, 1:1.11.11-1ubuntu1.21, 2:2.2.12-1ubuntu0.17, 2:3.2.12-2ubuntu1.6, 3:3.2.15-1ubuntu1.3, 3:3.2.18-1ubuntu0.1
python-django-doc (Ubuntu package) - update to Ubuntu Pro
python-django (Ubuntu package) - addressed in versions Ubuntu Pro, 1:1.11.11-1ubuntu1.21
yggdrasil-worker-forwarder (Red Hat package) - update to 0.0.3-1.el8sat
python-sqlparse (Red Hat package) - update to 0.4.4-1.0.1.el8ui
rubygem-foreman_maintain (Red Hat package) - update to 1.2.12-1.el8sat
pulpcore-selinux (Red Hat package) - update to 1.3.3-1.el8pc
rubygem-git (Red Hat package) - update to 1.18.0-1.el8sat
python3-Django - update to 2.0.7-150000.1.11.1
python3-Django - update to 2.2.27-5
python-django - update to 2.2.27-5
python-django-help - update to 2.2.27-5
python-django (Debian package) - addressed in versions 2:2.2.28-1~deb11u2, 3:3.2.19-1+deb12u1
Cloud Pak for Network Automation - update to 2.6.4
python-gitpython (Red Hat package) - update to 3.1.32-1.el8pc
python-django3 - addressed in versions 3.2.19-1.el8, 3.2.19-1.fc37, 3.2.19-1.fc38
python-django (Red Hat package) - addressed in versions 3.2.19-1.0.1.el8ui, 3.2.21-1.el8pc
foreman (Red Hat package) - update to 3.5.1.23-1.el8sat
foreman-installer (Red Hat package) - update to 3.5.2.4-1.el8sat
python-pulpcore (Red Hat package) - update to 3.21.18-1.el8pc
rhui-installer (Red Hat package) - update to 4.5.0.1-1.el8ui
rhui-tools (Red Hat package) - update to 4.5.0.5-1.el8ui
rubygem-katello (Red Hat package) - update to 4.7.0.33-1.el8sat
satellite (Red Hat package) - update to 6.13.5-1.el8sat
rubygem-foreman_rh_cloud (Red Hat package) - update to 7.0.48-1.el8sat
puppet-agent (Red Hat package) - update to 7.26.0-3.el8sat
rubygem-foreman_theme_satellite (Red Hat package) - update to 11.0.0.6-1.el8sat

External References

Related Security Bulletins