Django security releases issued: 4.2.7, 4.1.13, and 3.2.23
In accordance with our security release policy, the Django team is issuing Django 4.2.7, Django 4.1.13, and Django 3.2.23. These releases addresses the security issue detailed below. We encourage all users of Django to upgrade as soon as possible.
CVE-2023-46695: Potential denial of service vulnerability in UsernameField on Windows
The NFKC normalization is slow on Windows. As a consequence, django.contrib.auth.forms.UsernameField was subject to a potential denial of service attack via certain inputs with a very large number of Unicode characters.
In order to avoid the vulnerability, invalid values longer than UsernameField.max_length are no longer normalized, since they cannot pass validation anyway.
Thanks MProgrammer for the report.
This issue has severity "moderate" according to the Django security policy.
Affected supported versions
- Django main branch
- Django 5.0 (currently at beta status)
- Django 4.2
- Django 4.1
- Django 3.2
Resolution
Patches to resolve the issue have been applied to Django's main branch and the 5.0, 4.2, 4.1, and 3.2 release branches. The patches may be obtained from the following changesets:
- On the main branch
- On the 5.0 release branch
- On the 4.2 release branch
- On the 4.1 release branch
- On the 3.2 release branch
The following releases have been issued:
- Django 4.2.7 (download Django 4.2.7 | 4.2.7 checksums)
- Django 4.1.13 (download Django 4.1.13 | 4.1.13 checksums)
- Django 3.2.23 (download Django 3.2.23 | 3.2.23 checksums)
The PGP key ID used for this release is Mariusz Felisiak: 2EF56372BA48CD1B.
General notes regarding security reporting
As always, we ask that potential security issues be reported via private email to security@djangoproject.com, and not via Django's Trac instance or the django-developers list. Please see our security policies for further information.