{"title":"Django 5.0.3 release notes","version":"dev","locale":"en","docname":"releases/5.0.3","url":"/en/dev/releases/5.0.3/","canonical":"https://djangodocs.dev/en/dev/releases/5.0.3/","summary":"Django 5.0.3 fixes a security issue with severity “moderate” and several bugs in 5.0.2.","html":"<h1>Django 5.0.3 release notes<a class=\"heading-anchor\" href=\"#django-5-0-3-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>March 4, 2024</em></p>\n<p>Django 5.0.3 fixes a security issue with severity “moderate” and several bugs\nin 5.0.2.</p>\n<section id=\"cve-2024-27351-potential-regular-expression-denial-of-service-in-django-utils-text-truncator-words\">\n<h2>CVE-2024-27351: Potential regular expression denial-of-service in <code class=\"docutils literal notranslate\">django.utils.text.Truncator.words()</code><a class=\"heading-anchor\" href=\"#cve-2024-27351-potential-regular-expression-denial-of-service-in-django-utils-text-truncator-words\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><code class=\"docutils literal notranslate\">django.utils.text.Truncator.words()</code> method (with <code class=\"docutils literal notranslate\">html=True</code>) and\n<a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatefilter-truncatewords_html\"><code class=\"xref std std-tfilter docutils literal notranslate\">truncatewords_html</code></a> template filter were subject to a potential\nregular expression denial-of-service attack using a suitably crafted string\n(follow up to <span class=\"target\" id=\"index-0\"></span><a class=\"cve reference external\" href=\"https://www.cve.org/CVERecord?id=CVE-2019-14232\"><strong>CVE 2019-14232</strong></a> and <span class=\"target\" id=\"index-1\"></span><a class=\"cve reference external\" href=\"https://www.cve.org/CVERecord?id=CVE-2023-43665\"><strong>CVE 2023-43665</strong></a>).</p>\n</section>\n<section id=\"bugfixes\">\n<h2>Bugfixes<a class=\"heading-anchor\" href=\"#bugfixes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<ul class=\"simple\">\n<li><p>Fixed a regression in Django 5.0.2 where <code class=\"docutils literal notranslate\">intcomma</code> template filter could\nreturn a leading comma for string representation of floats (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35172\">#35172</a>).</p></li>\n<li><p>Fixed a bug in Django 5.0 that caused a crash of <code class=\"docutils literal notranslate\">Signal.asend()</code> and\n<code class=\"docutils literal notranslate\">asend_robust()</code> when all receivers were asynchronous functions\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35174\">#35174</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0.1 where <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.lookup_allowed\" title=\"django.contrib.admin.ModelAdmin.lookup_allowed\"><code class=\"xref py py-meth docutils literal notranslate\">ModelAdmin.lookup_allowed()</code></a>\nwould prevent filtering against foreign keys using lookups like <code class=\"docutils literal notranslate\">__isnull</code>\nwhen the field was not included in <a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_filter\" title=\"django.contrib.admin.ModelAdmin.list_filter\"><code class=\"xref py py-attr docutils literal notranslate\">ModelAdmin.list_filter</code></a>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35173\">#35173</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0 that caused a crash of\n<code class=\"docutils literal notranslate\">&#64;sensitive_variables</code> and <code class=\"docutils literal notranslate\">&#64;sensitive_post_parameters</code> decorators on\nfunctions loaded from <code class=\"docutils literal notranslate\">.pyc</code> files (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35187\">#35187</a>).</p></li>\n<li><p>Fixed a regression in Django 5.0 that caused a crash when reloading a test\ndatabase and a base queryset for a base manager used <code class=\"docutils literal notranslate\">prefetch_related()</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35238\">#35238</a>).</p></li>\n<li><p>Fixed a bug in Django 5.0 where facet filters in the admin would crash on a\n<code class=\"docutils literal notranslate\">SimpleListFilter</code> using a queryset without primary keys (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/35198\">#35198</a>).</p></li>\n</ul>\n</section>","rootId":"django-5-0-3-release-notes","toc":[{"title":"CVE-2024-27351: Potential regular expression denial-of-service in django.utils.text.Truncator.words()","anchor":"cve-2024-27351-potential-regular-expression-denial-of-service-in-django-utils-text-truncator-words","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/5.0.4","title":"Django 5.0.4 release notes","url":"/en/dev/releases/5.0.4/"},"next":{"docname":"releases/5.0.2","title":"Django 5.0.2 release notes","url":"/en/dev/releases/5.0.2/"},"formats":{"html":"/en/dev/releases/5.0.3/","markdown":"/en/dev/releases/5.0.3.md","json":"/en/dev/releases/5.0.3.json"},"source":"https://github.com/django/django/blob/main/docs/releases/5.0.3.txt","official":"https://docs.djangoproject.com/en/dev/releases/5.0.3/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0"],"inLocales":["en"]}