CVE-2023-31047 is a critical-severity (CVSS 9.8) Improper Input Validation vulnerability in django. A fix is available for django — see the affected versions and patch details below.
Django bypasses validation when using one form field to upload multiple files
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-31047.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
django🐍django🐍djangoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
In Django 3.2 before 3.2.19, 4.x before 4.1.9, and 4.2 before 4.2.1, it was possible to bypass validation when using one form field to upload multiple files. This multiple upload has never been supported by forms.FileField or forms.ImageField (only the last uploaded file was validated). However, Django's "Uploading multiple files" documentation suggested otherwise.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | django | ≥ 3.2a1&&< 3.2.19 | 3.2.19pip install --upgrade 'django==3.2.19' |
| 🐍PyPI | django | ≥ 4.0a1&&< 4.1.9 | 4.1.9pip install --upgrade 'django==4.1.9' |
| 🐍PyPI | django | ≥ 4.2a1&&< 4.2.1 | 4.2.1pip install --upgrade 'django==4.2.1' |
Affected Products
djangodjangoprojectfedorafedoraprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update django to 3.2.19 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-31047 is resolved across your whole dependency graph.
Workarounds
Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Satellite and Red Hat Update Infrastructure individual impact ratings have been set to Low since initial privileges are required in order to access the server and the vulnerable functionality.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Satellite 6.13 for RHEL 8 | python-django-0:3.2.21-1.el8pc | RHSA-2023:5931 |
| Red Hat Satellite 6.14 for RHEL 8 | python-django-0:3.2.21-1.el8pc | RHSA-2023:6818 |
| RHUI 4 for RHEL 8 | python-django-0:3.2.19-1.0.1.el8ui | RHSA-2023:4591 |
Frequently Asked Questions
Is CVE-2023-31047 in your dependencies?
Find it across PyPI, including transitive dependencies.