| 1 |
========================== |
| 2 |
Django 5.0.8 release notes |
| 3 |
========================== |
| 4 |
|
| 5 |
*August 6, 2024* |
| 6 |
|
| 7 |
Django 5.0.8 fixes three security issues with severity "moderate", one security |
| 8 |
issue with severity "high", and several bugs in 5.0.7. |
| 9 |
|
| 10 |
CVE-2024-41989: Memory exhaustion in ``django.utils.numberformat.floatformat()`` |
| 11 |
================================================================================ |
| 12 |
|
| 13 |
If :tfilter:`floatformat` received a string representation of a number in |
| 14 |
scientific notation with a large exponent, it could lead to significant memory |
| 15 |
consumption. |
| 16 |
|
| 17 |
To avoid this, decimals with more than 200 digits are now returned as is. |
| 18 |
|
| 19 |
CVE-2024-41990: Potential denial-of-service vulnerability in ``django.utils.html.urlize()`` |
| 20 |
=========================================================================================== |
| 21 |
|
| 22 |
:tfilter:`urlize` and :tfilter:`urlizetrunc` were subject to a potential |
| 23 |
denial-of-service attack via very large inputs with a specific sequence of |
| 24 |
characters. |
| 25 |
|
| 26 |
CVE-2024-41991: Potential denial-of-service vulnerability in ``django.utils.html.urlize()`` and ``AdminURLFieldWidget`` |
| 27 |
======================================================================================================================= |
| 28 |
|
| 29 |
:tfilter:`urlize`, :tfilter:`urlizetrunc`, and ``AdminURLFieldWidget`` were |
| 30 |
subject to a potential denial-of-service attack via certain inputs with a very |
| 31 |
large number of Unicode characters. |
| 32 |
|
| 33 |
CVE-2024-42005: Potential SQL injection in ``QuerySet.values()`` and ``values_list()`` |
| 34 |
====================================================================================== |
| 35 |
|
| 36 |
:meth:`.QuerySet.values` and :meth:`~.QuerySet.values_list` methods on models |
| 37 |
with a ``JSONField`` were subject to SQL injection in column aliases, via a |
| 38 |
crafted JSON object key as a passed ``*arg``. |
| 39 |
|
| 40 |
Bugfixes |
| 41 |
======== |
| 42 |
|
| 43 |
* Added missing validation for ``UniqueConstraint(nulls_distinct=False)`` when |
| 44 |
using ``*expressions`` (:ticket:`35594`). |
| 45 |
|
| 46 |
* Fixed a regression in Django 5.0 where ``ModelAdmin.action_checkbox`` could |
| 47 |
break the admin changelist HTML page when rendering a model instance with a |
| 48 |
``__html__`` method (:ticket:`35606`). |
| 49 |
|
| 50 |
* Fixed a crash when creating a model with a ``Field.db_default`` and a |
| 51 |
``Meta.constraints`` constraint composed of ``__endswith``, ``__startswith``, |
| 52 |
or ``__contains`` lookups (:ticket:`35625`). |
| 53 |
|
| 54 |
* Fixed a regression in Django 5.0.7 that caused a crash in |
| 55 |
``LocaleMiddleware`` when processing a language code over 500 characters |
| 56 |
(:ticket:`35627`). |
| 57 |
|
| 58 |
* Fixed a bug in Django 5.0 that caused a system check crash when |
| 59 |
``ModelAdmin.date_hierarchy`` was a ``GeneratedField`` with an |
| 60 |
``output_field`` of ``DateField`` or ``DateTimeField`` (:ticket:`35628`). |
| 61 |
|
| 62 |
* Fixed a bug in Django 5.0 which caused constraint validation to either crash |
| 63 |
or incorrectly raise validation errors for constraints referring to fields |
| 64 |
using ``Field.db_default`` (:ticket:`35638`). |
| 65 |
|
| 66 |
* Fixed a crash in Django 5.0 when saving a model containing a ``FileField`` |
| 67 |
with a ``db_default`` set (:ticket:`35657`). |