{"title":"Django 5.1.7 release notes","version":"dev","locale":"en","docname":"releases/5.1.7","url":"/en/dev/releases/5.1.7/","canonical":"https://djangodocs.dev/en/dev/releases/5.1.7/","summary":"Django 5.1.7 fixes a security issue with severity “moderate” and several bugs in 5.1.6.","html":"<h1>Django 5.1.7 release notes<a class=\"heading-anchor\" href=\"#django-5-1-7-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>March 6, 2025</em></p>\n<p>Django 5.1.7 fixes a security issue with severity “moderate” and several bugs\nin 5.1.6.</p>\n<section id=\"cve-2025-26699-potential-denial-of-service-vulnerability-in-django-utils-text-wrap\">\n<h2>CVE-2025-26699: Potential denial-of-service vulnerability in <code class=\"docutils literal notranslate\">django.utils.text.wrap()</code><a class=\"heading-anchor\" href=\"#cve-2025-26699-potential-denial-of-service-vulnerability-in-django-utils-text-wrap\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The <code class=\"docutils literal notranslate\">wrap()</code> and <a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatefilter-wordwrap\"><code class=\"xref std std-tfilter docutils literal notranslate\">wordwrap</code></a> template filter were subject to a\npotential denial-of-service attack when used with very long strings.</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 bug in Django 5.1 where the <code class=\"docutils literal notranslate\">{% querystring %}</code> template tag\nreturned an empty string rather than <code class=\"docutils literal notranslate\">&quot;?&quot;</code> when all parameters had been\nremoved from the query string (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/36182\">#36182</a>).</p></li>\n<li><p>Fixed a bug in Django 5.1 where <code class=\"docutils literal notranslate\">FileSystemStorage</code>, with\n<code class=\"docutils literal notranslate\">allow_overwrite</code> set to <code class=\"docutils literal notranslate\">True</code>, did not truncate the overwritten file\ncontent (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/36191\">#36191</a>).</p></li>\n<li><p>Fixed a regression in Django 5.1 where the <code class=\"docutils literal notranslate\">count</code> and <code class=\"docutils literal notranslate\">exists</code> methods\nof <code class=\"docutils literal notranslate\">ManyToManyField</code> related managers would always return <code class=\"docutils literal notranslate\">0</code> and\n<code class=\"docutils literal notranslate\">False</code> when the intermediary model back references used <code class=\"docutils literal notranslate\">to_field</code>\n(<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/36197\">#36197</a>).</p></li>\n<li><p>Fixed a regression in Django 5.1 where the <code class=\"docutils literal notranslate\">pre_save</code> and <code class=\"docutils literal notranslate\">post_save</code>\nsignals for <code class=\"docutils literal notranslate\">LogEntry</code> were not sent when deleting a single object in the\nadmin (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/36217\">#36217</a>).</p></li>\n</ul>\n</section>","rootId":"django-5-1-7-release-notes","toc":[{"title":"CVE-2025-26699: Potential denial-of-service vulnerability in django.utils.text.wrap()","anchor":"cve-2025-26699-potential-denial-of-service-vulnerability-in-django-utils-text-wrap","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/5.1.8","title":"Django 5.1.8 release notes","url":"/en/dev/releases/5.1.8/"},"next":{"docname":"releases/5.1.6","title":"Django 5.1.6 release notes","url":"/en/dev/releases/5.1.6/"},"formats":{"html":"/en/dev/releases/5.1.7/","markdown":"/en/dev/releases/5.1.7.md","json":"/en/dev/releases/5.1.7.json"},"source":"https://github.com/django/django/blob/main/docs/releases/5.1.7.txt","official":"https://docs.djangoproject.com/en/dev/releases/5.1.7/","inVersions":["dev","6.1","6.0","5.2","5.1"],"inLocales":["en"]}