Django 5.1.1 release notes¶
September 3, 2024
Django 5.1.1 fixes one security issue with severity “moderate”, one security issue with severity “low”, and several bugs in 5.1.
CVE-2024-45230: Potential denial-of-service vulnerability in django.utils.html.urlize()
¶
urlize
and urlizetrunc
were subject to a potential
denial-of-service attack via very large inputs with a specific sequence of
characters.
CVE-2024-45231: Potential user email enumeration via response status on password reset¶
Due to unhandled email sending failures, the
PasswordResetForm
class allowed remote
attackers to enumerate user emails by issuing password reset requests and
observing the outcomes.
To mitigate this risk, exceptions occurring during password reset email sending are now handled and logged using the django.contrib.auth logger.
Bugfixes¶
- Fixed a regression in Django 5.1 that caused a crash of
Window()
when passing an empty sequence to theorder_by
parameter, and a crash ofPrefetch()
for a sliced queryset without ordering (#35665). - Fixed a regression in Django 5.1 where a new
usable_password
field was included inBaseUserCreationForm
(and children). A newAdminUserCreationForm
including this field was added, isolating the feature to the admin where it was intended (#35678). - Adjusted the deprecation warning
stacklevel
inModel.save()
andModel.asave()
to correctly point to the offending call site (#35060). - Adjusted the deprecation warning
stacklevel
when usingOS_OPEN_FLAGS
inFileSystemStorage
to correctly point to the offending call site (#35326). - Adjusted the deprecation warning
stacklevel
inFieldCacheMixin.get_cache_name()
to correctly point to the offending call site (#35405). - Restored, following a regression in Django 5.1, the ability to override the
timezone and role setting behavior used within the
init_connection_state
method of the PostgreSQL backend (#35688). - Fixed a bug in Django 5.1 where variable lookup errors were logged when rendering admin fieldsets (#35716).