What’s Vulnerable › Vulnerabilities
CVE-2023-31047: Django bypasses validation when using one form field to upload multiple files
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2023-05-07 · updated 2026-06-17
- Weakness: CWE-20
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 products
- Django: from 3.2 before 3.2.19; from 4.0 before 4.1.9; 4.2, 4.2-b1, 4.2-rc1 — fixed in 3.2.19, 4.1.9
- Fedoraproject Fedora: 38
- Pypi Django: from 3.2 before 3.2.19; from 4.0 before 4.1.9; from 4.2 before 4.2.1; 3.2, 3.2.1, 3.2.10, 3.2.11, 3.2.12, 3.2.13 (+43) — fixed in 3.2.19, 4.1.9, 4.2.1
How to fix
Upgrade to a fixed version: Django 3.2.19, 4.1.9; Pypi Django 3.2.19, 4.1.9, 4.2.1. Check the vendor advisory for mitigations.
References
- https://docs.djangoproject.com/en/4.2/releases/security/
- https://groups.google.com/forum/#%21forum/django-announce
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A45VKTUVQ2BN6D5ZLZGCM774R6QGFOHW/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DNEHD6N435OE2XUFGDAAVAXSYWLCUBFD/
- https://security.netapp.com/advisory/ntap-20230609-0008/
- https://www.djangoproject.com/weblog/2023/may/03/security-releases/
- https://docs.djangoproject.com/en/4.2/releases/security/
- https://groups.google.com/forum/#%21forum/django-announce
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A45VKTUVQ2BN6D5ZLZGCM774R6QGFOHW/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/DNEHD6N435OE2XUFGDAAVAXSYWLCUBFD/
- https://security.netapp.com/advisory/ntap-20230609-0008/
- https://www.djangoproject.com/weblog/2023/may/03/security-releases/
Get alerted when CVE-2023-31047 or the next vulnerability affects your stack