{"title":"Django 4.1.9 release notes","version":"dev","locale":"en","docname":"releases/4.1.9","url":"/en/dev/releases/4.1.9/","canonical":"https://djangodocs.dev/en/dev/releases/4.1.9/","summary":"Django 4.1.9 fixes a security issue with severity “low” in 4.1.8. Uploading multiple files using one form field has never been supported by forms.FileField…","html":"<h1>Django 4.1.9 release notes<a class=\"heading-anchor\" href=\"#django-4-1-9-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>May 3, 2023</em></p>\n<p>Django 4.1.9 fixes a security issue with severity “low” in 4.1.8.</p>\n<section id=\"cve-2023-31047-potential-bypass-of-validation-when-uploading-multiple-files-using-one-form-field\">\n<h2>CVE-2023-31047: Potential bypass of validation when uploading multiple files using one form field<a class=\"heading-anchor\" href=\"#cve-2023-31047-potential-bypass-of-validation-when-uploading-multiple-files-using-one-form-field\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Uploading multiple files using one form field has never been supported by\n<a class=\"reference internal\" href=\"/en/dev/ref/forms/fields/#django.forms.FileField\" title=\"django.forms.FileField\"><code class=\"xref py py-class docutils literal notranslate\">forms.FileField</code></a> or <a class=\"reference internal\" href=\"/en/dev/ref/forms/fields/#django.forms.ImageField\" title=\"django.forms.ImageField\"><code class=\"xref py py-class docutils literal notranslate\">forms.ImageField</code></a> as only the last\nuploaded file was validated. Unfortunately, <a class=\"reference internal\" href=\"/en/dev/topics/http/file-uploads/#uploading-multiple-files\"><span class=\"std std-ref\">Uploading multiple files</span></a>\ntopic suggested otherwise.</p>\n<p>In order to avoid the vulnerability, <a class=\"reference internal\" href=\"/en/dev/ref/forms/widgets/#django.forms.ClearableFileInput\" title=\"django.forms.ClearableFileInput\"><code class=\"xref py py-class docutils literal notranslate\">ClearableFileInput</code></a>\nand <a class=\"reference internal\" href=\"/en/dev/ref/forms/widgets/#django.forms.FileInput\" title=\"django.forms.FileInput\"><code class=\"xref py py-class docutils literal notranslate\">FileInput</code></a> form widgets now raise <code class=\"docutils literal notranslate\">ValueError</code> when\nthe <code class=\"docutils literal notranslate\">multiple</code> HTML attribute is set on them. To prevent the exception and\nkeep the old behavior, set <code class=\"docutils literal notranslate\">allow_multiple_selected</code> to <code class=\"docutils literal notranslate\">True</code>.</p>\n<p>For more details on using the new attribute and handling of multiple files\nthrough a single field, see <a class=\"reference internal\" href=\"/en/dev/topics/http/file-uploads/#uploading-multiple-files\"><span class=\"std std-ref\">Uploading multiple files</span></a>.</p>\n</section>","rootId":"django-4-1-9-release-notes","toc":[{"title":"CVE-2023-31047: Potential bypass of validation when uploading multiple files using one form field","anchor":"cve-2023-31047-potential-bypass-of-validation-when-uploading-multiple-files-using-one-form-field","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/4.1.10","title":"Django 4.1.10 release notes","url":"/en/dev/releases/4.1.10/"},"next":{"docname":"releases/4.1.8","title":"Django 4.1.8 release notes","url":"/en/dev/releases/4.1.8/"},"formats":{"html":"/en/dev/releases/4.1.9/","markdown":"/en/dev/releases/4.1.9.md","json":"/en/dev/releases/4.1.9.json"},"source":"https://github.com/django/django/blob/main/docs/releases/4.1.9.txt","official":"https://docs.djangoproject.com/en/dev/releases/4.1.9/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1"],"inLocales":["en"]}