| 1 |
========================== |
| 2 |
Django 5.2.9 release notes |
| 3 |
========================== |
| 4 |
|
| 5 |
*December 2, 2025* |
| 6 |
|
| 7 |
Django 5.2.9 fixes one security issue with severity "high", one security issue |
| 8 |
with severity "moderate", and several bugs in 5.2.8. |
| 9 |
|
| 10 |
CVE-2025-13372: Potential SQL injection in ``FilteredRelation`` column aliases on PostgreSQL |
| 11 |
============================================================================================ |
| 12 |
|
| 13 |
:class:`.FilteredRelation` was subject to SQL injection in column aliases, |
| 14 |
using a suitably crafted dictionary, with dictionary expansion, as the |
| 15 |
``**kwargs`` passed to :meth:`.QuerySet.annotate` or :meth:`.QuerySet.alias` on |
| 16 |
PostgreSQL. |
| 17 |
|
| 18 |
CVE-2025-64460: Potential denial-of-service vulnerability in XML ``Deserializer`` |
| 19 |
================================================================================= |
| 20 |
|
| 21 |
:ref:`XML Serialization <serialization-formats-xml>` was subject to a potential |
| 22 |
denial-of-service attack due to quadratic time complexity when deserializing |
| 23 |
crafted documents containing many nested invalid elements. The internal helper |
| 24 |
``django.core.serializers.xml_serializer.getInnerText()`` previously |
| 25 |
accumulated inner text inefficiently during recursion. It now collects text per |
| 26 |
element, avoiding excessive resource usage. |
| 27 |
|
| 28 |
Bugfixes |
| 29 |
======== |
| 30 |
|
| 31 |
* Fixed a bug in Django 5.2 where |
| 32 |
``django.utils.feedgenerator.Stylesheet.__str__()`` did not escape |
| 33 |
the ``url``, ``mimetype``, and ``media`` attributes, potentially leading |
| 34 |
to invalid XML markup (:ticket:`36733`). |
| 35 |
|
| 36 |
* Fixed a bug in Django 5.2 on PostgreSQL where ``bulk_create()`` did not apply |
| 37 |
a field's custom query placeholders (:ticket:`36748`). |
| 38 |
|
| 39 |
* Fixed a regression in Django 5.2.2 that caused a crash when using aggregate |
| 40 |
functions with an empty ``Q`` filter over a queryset with annotations |
| 41 |
(:ticket:`36751`). |
| 42 |
|
| 43 |
* Fixed a regression in Django 5.2.8 where ``DisallowedRedirect`` was raised by |
| 44 |
:class:`~django.http.HttpResponseRedirect` and |
| 45 |
:class:`~django.http.HttpResponsePermanentRedirect` for URLs longer than 2048 |
| 46 |
characters. The limit is now 16384 characters (:ticket:`36743`). |
| 47 |
|
| 48 |
* Fixed a crash on Python 3.14+ that prevented template tag functions from |
| 49 |
being registered when their type annotations required deferred evaluation |
| 50 |
(:ticket:`36712`). |