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