{"title":"Django 4.1.12 release notes","version":"dev","locale":"en","docname":"releases/4.1.12","url":"/en/dev/releases/4.1.12/","canonical":"https://djangodocs.dev/en/dev/releases/4.1.12/","summary":"Django 4.1.12 fixes a security issue with severity “moderate” in 4.1.11. Following the fix for CVE 2019-14232, the regular expressions used in the…","html":"<h1>Django 4.1.12 release notes<a class=\"heading-anchor\" href=\"#django-4-1-12-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>October 4, 2023</em></p>\n<p>Django 4.1.12 fixes a security issue with severity “moderate” in 4.1.11.</p>\n<section id=\"cve-2023-43665-denial-of-service-possibility-in-django-utils-text-truncator\">\n<h2>CVE-2023-43665: Denial-of-service possibility in <code class=\"docutils literal notranslate\">django.utils.text.Truncator</code><a class=\"heading-anchor\" href=\"#cve-2023-43665-denial-of-service-possibility-in-django-utils-text-truncator\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Following the fix for <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>, the regular expressions used in the\nimplementation of <code class=\"docutils literal notranslate\">django.utils.text.Truncator</code>’s <code class=\"docutils literal notranslate\">chars()</code> and <code class=\"docutils literal notranslate\">words()</code>\nmethods (with <code class=\"docutils literal notranslate\">html=True</code>) were revised and improved. However, these regular\nexpressions still exhibited linear backtracking complexity, so when given a\nvery long, potentially malformed HTML input, the evaluation would still be\nslow, leading to a potential denial of service vulnerability.</p>\n<p>The <code class=\"docutils literal notranslate\">chars()</code> and <code class=\"docutils literal notranslate\">words()</code> methods are used to implement the\n<a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatefilter-truncatechars_html\"><code class=\"xref std std-tfilter docutils literal notranslate\">truncatechars_html</code></a> and <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\nfilters, which were thus also vulnerable.</p>\n<p>The input processed by <code class=\"docutils literal notranslate\">Truncator</code>, when operating in HTML mode, has been\nlimited to the first five million characters in order to avoid potential\nperformance and memory issues.</p>\n</section>","rootId":"django-4-1-12-release-notes","toc":[{"title":"CVE-2023-43665: Denial-of-service possibility in django.utils.text.Truncator","anchor":"cve-2023-43665-denial-of-service-possibility-in-django-utils-text-truncator","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/4.1.13","title":"Django 4.1.13 release notes","url":"/en/dev/releases/4.1.13/"},"next":{"docname":"releases/4.1.11","title":"Django 4.1.11 release notes","url":"/en/dev/releases/4.1.11/"},"formats":{"html":"/en/dev/releases/4.1.12/","markdown":"/en/dev/releases/4.1.12.md","json":"/en/dev/releases/4.1.12.json"},"source":"https://github.com/django/django/blob/main/docs/releases/4.1.12.txt","official":"https://docs.djangoproject.com/en/dev/releases/4.1.12/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1"],"inLocales":["en"]}