{"title":"Django 4.2.7 release notes","version":"dev","locale":"en","docname":"releases/4.2.7","url":"/en/dev/releases/4.2.7/","canonical":"https://djangodocs.dev/en/dev/releases/4.2.7/","summary":"Django 4.2.7 fixes a security issue with severity “moderate” and several bugs in 4.2.6.","html":"<h1>Django 4.2.7 release notes<a class=\"heading-anchor\" href=\"#django-4-2-7-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>November 1, 2023</em></p>\n<p>Django 4.2.7 fixes a security issue with severity “moderate” and several bugs\nin 4.2.6.</p>\n<section id=\"cve-2023-46695-potential-denial-of-service-vulnerability-in-usernamefield-on-windows\">\n<h2>CVE-2023-46695: Potential denial of service vulnerability in <code class=\"docutils literal notranslate\">UsernameField</code> on Windows<a class=\"heading-anchor\" href=\"#cve-2023-46695-potential-denial-of-service-vulnerability-in-usernamefield-on-windows\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The <a class=\"reference external\" href=\"https://docs.python.org/3/library/unicodedata.html#unicodedata.normalize\" title=\"(in Python v3.14)\"><code class=\"xref py py-func docutils literal notranslate\">NFKC normalization</code></a> is slow on\nWindows. As a consequence, <code class=\"docutils literal notranslate\">django.contrib.auth.forms.UsernameField</code> was\nsubject to a potential denial of service attack via certain inputs with a very\nlarge number of Unicode characters.</p>\n<p>In order to avoid the vulnerability, invalid values longer than\n<code class=\"docutils literal notranslate\">UsernameField.max_length</code> are no longer normalized, since they cannot pass\nvalidation anyway.</p>\n</section>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Fixed a regression in Django 4.2 that caused a crash of\n<code class=\"docutils literal notranslate\">QuerySet.aggregate()</code> with aggregates referencing expressions containing\nsubqueries (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34798\">#34798</a>).</p></li>\n<li><p>Restored, following a regression in Django 4.2, creating\n<code class=\"docutils literal notranslate\">varchar/text_pattern_ops</code> indexes on <code class=\"docutils literal notranslate\">CharField</code> and <code class=\"docutils literal notranslate\">TextField</code> with\ndeterministic collations on PostgreSQL (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/34932\">#34932</a>).</p></li>\n</ul>\n</section>","rootId":"django-4-2-7-release-notes","toc":[{"title":"CVE-2023-46695: Potential denial of service vulnerability in UsernameField on Windows","anchor":"cve-2023-46695-potential-denial-of-service-vulnerability-in-usernamefield-on-windows","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/4.2.8","title":"Django 4.2.8 release notes","url":"/en/dev/releases/4.2.8/"},"next":{"docname":"releases/4.2.6","title":"Django 4.2.6 release notes","url":"/en/dev/releases/4.2.6/"},"formats":{"html":"/en/dev/releases/4.2.7/","markdown":"/en/dev/releases/4.2.7.md","json":"/en/dev/releases/4.2.7.json"},"source":"https://github.com/django/django/blob/main/docs/releases/4.2.7.txt","official":"https://docs.djangoproject.com/en/dev/releases/4.2.7/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2"],"inLocales":["en"]}