| 1 |
=========================== |
| 2 |
Django 4.2.29 release notes |
| 3 |
=========================== |
| 4 |
|
| 5 |
*March 3, 2026* |
| 6 |
|
| 7 |
Django 4.2.29 fixes a security issue with severity "moderate" and a security |
| 8 |
issue with severity "low" in 4.2.28. |
| 9 |
|
| 10 |
CVE-2026-25673: Potential denial-of-service vulnerability in ``URLField`` via Unicode normalization on Windows |
| 11 |
============================================================================================================== |
| 12 |
|
| 13 |
The :class:`~django.forms.URLField` form field's ``to_python()`` method used |
| 14 |
:func:`~urllib.parse.urlsplit` to determine whether to prepend a URL scheme to |
| 15 |
the submitted value. On Windows, ``urlsplit()`` performs |
| 16 |
:func:`NFKC normalization <python:unicodedata.normalize>`, which can be |
| 17 |
disproportionately slow for large inputs containing certain characters. |
| 18 |
|
| 19 |
``URLField.to_python()`` now uses a simplified scheme detection, avoiding |
| 20 |
Unicode normalization entirely and deferring URL validation to the appropriate |
| 21 |
layers. As a result, while leading and trailing whitespace is still stripped by |
| 22 |
default, characters such as newlines, tabs, and other control characters within |
| 23 |
the value are no longer handled by ``URLField.to_python()``. When using the |
| 24 |
default :class:`~django.core.validators.URLValidator`, these values will |
| 25 |
continue to raise :exc:`~django.core.exceptions.ValidationError` during |
| 26 |
validation, but if you rely on custom validators, ensure they do not depend on |
| 27 |
the previous behavior of ``URLField.to_python()``. |
| 28 |
|
| 29 |
This issue has severity "moderate" according to the :ref:`Django security |
| 30 |
policy <severity-levels>`. |
| 31 |
|
| 32 |
CVE-2026-25674: Potential incorrect permissions on newly created file system objects |
| 33 |
==================================================================================== |
| 34 |
|
| 35 |
Django's file-system storage and file-based cache backends used the process |
| 36 |
``umask`` to control permissions when creating directories. In multi-threaded |
| 37 |
environments, one thread's temporary umask change can affect other threads' |
| 38 |
file and directory creation, resulting in file system objects being created |
| 39 |
with unintended permissions. |
| 40 |
|
| 41 |
Django now applies the requested permissions via :func:`~os.chmod` after |
| 42 |
:func:`~os.mkdir`, removing the dependency on the process-wide umask. |
| 43 |
|
| 44 |
This issue has severity "low" according to the :ref:`Django security policy |
| 45 |
<severity-levels>`. |