{"title":"Django 1.11.23 release notes","version":"dev","locale":"en","docname":"releases/1.11.23","url":"/en/dev/releases/1.11.23/","canonical":"https://djangodocs.dev/en/dev/releases/1.11.23/","summary":"Django 1.11.23 fixes security issues in 1.11.22. If django.utils.text.Truncator’s chars() and words() methods were passed the html=True argument, they were…","html":"<h1>Django 1.11.23 release notes<a class=\"heading-anchor\" href=\"#django-1-11-23-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>August 1, 2019</em></p>\n<p>Django 1.11.23 fixes security issues in 1.11.22.</p>\n<section id=\"cve-2019-14232-denial-of-service-possibility-in-django-utils-text-truncator\">\n<h2>CVE-2019-14232: Denial-of-service possibility in <code class=\"docutils literal notranslate\">django.utils.text.Truncator</code><a class=\"heading-anchor\" href=\"#cve-2019-14232-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>If <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> methods\nwere passed the <code class=\"docutils literal notranslate\">html=True</code> argument, they were extremely slow to evaluate\ncertain inputs due to a catastrophic backtracking vulnerability in a regular\nexpression. 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 vulnerable.</p>\n<p>The regular expressions used by <code class=\"docutils literal notranslate\">Truncator</code> have been simplified in order to\navoid potential backtracking issues. As a consequence, trailing punctuation may\nnow at times be included in the truncated output.</p>\n</section>\n<section id=\"cve-2019-14233-denial-of-service-possibility-in-strip-tags\">\n<h2>CVE-2019-14233: Denial-of-service possibility in <code class=\"docutils literal notranslate\">strip_tags()</code><a class=\"heading-anchor\" href=\"#cve-2019-14233-denial-of-service-possibility-in-strip-tags\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Due to the behavior of the underlying <code class=\"docutils literal notranslate\">HTMLParser</code>,\n<a class=\"reference internal\" href=\"/en/dev/ref/utils/#django.utils.html.strip_tags\" title=\"django.utils.html.strip_tags\"><code class=\"xref py py-func docutils literal notranslate\">django.utils.html.strip_tags()</code></a> would be extremely slow to evaluate\ncertain inputs containing large sequences of nested incomplete HTML entities.\nThe <code class=\"docutils literal notranslate\">strip_tags()</code> method is used to implement the corresponding\n<a class=\"reference internal\" href=\"/en/dev/ref/templates/builtins/#std-templatefilter-striptags\"><code class=\"xref std std-tfilter docutils literal notranslate\">striptags</code></a> template filter, which was thus also vulnerable.</p>\n<p><code class=\"docutils literal notranslate\">strip_tags()</code> now avoids recursive calls to <code class=\"docutils literal notranslate\">HTMLParser</code> when progress\nremoving tags, but necessarily incomplete HTML entities, stops being made.</p>\n<p>Remember that absolutely NO guarantee is provided about the results of\n<code class=\"docutils literal notranslate\">strip_tags()</code> being HTML safe. So NEVER mark safe the result of a\n<code class=\"docutils literal notranslate\">strip_tags()</code> call without escaping it first, for example with\n<a class=\"reference internal\" href=\"/en/dev/ref/utils/#django.utils.html.escape\" title=\"django.utils.html.escape\"><code class=\"xref py py-func docutils literal notranslate\">django.utils.html.escape()</code></a>.</p>\n</section>\n<section id=\"cve-2019-14234-sql-injection-possibility-in-key-and-index-lookups-for-jsonfield-hstorefield\">\n<h2>CVE-2019-14234: SQL injection possibility in key and index lookups for <code class=\"docutils literal notranslate\">JSONField</code>/<code class=\"docutils literal notranslate\">HStoreField</code><a class=\"heading-anchor\" href=\"#cve-2019-14234-sql-injection-possibility-in-key-and-index-lookups-for-jsonfield-hstorefield\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p><a class=\"reference internal\" href=\"/en/dev/topics/db/queries/#std-fieldlookup-jsonfield.key\"><code class=\"xref std std-lookup docutils literal notranslate\">Key and index lookups</code></a> for\n<code class=\"docutils literal notranslate\">django.contrib.postgres.fields.JSONField</code> and <a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/fields/#std-fieldlookup-hstorefield.key\"><code class=\"xref std std-lookup docutils literal notranslate\">key lookups</code></a> for <a class=\"reference internal\" href=\"/en/dev/ref/contrib/postgres/fields/#django.contrib.postgres.fields.HStoreField\" title=\"django.contrib.postgres.fields.HStoreField\"><code class=\"xref py py-class docutils literal notranslate\">HStoreField</code></a>\nwere subject to SQL injection, using a suitably crafted dictionary, with\ndictionary expansion, as the <code class=\"docutils literal notranslate\">**kwargs</code> passed to <code class=\"docutils literal notranslate\">QuerySet.filter()</code>.</p>\n</section>\n<section id=\"cve-2019-14235-potential-memory-exhaustion-in-django-utils-encoding-uri-to-iri\">\n<h2>CVE-2019-14235: Potential memory exhaustion in <code class=\"docutils literal notranslate\">django.utils.encoding.uri_to_iri()</code><a class=\"heading-anchor\" href=\"#cve-2019-14235-potential-memory-exhaustion-in-django-utils-encoding-uri-to-iri\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>If passed certain inputs, <a class=\"reference internal\" href=\"/en/dev/ref/utils/#django.utils.encoding.uri_to_iri\" title=\"django.utils.encoding.uri_to_iri\"><code class=\"xref py py-func docutils literal notranslate\">django.utils.encoding.uri_to_iri()</code></a> could lead\nto significant memory usage due to excessive recursion when re-percent-encoding\ninvalid UTF-8 octet sequences.</p>\n<p><code class=\"docutils literal notranslate\">uri_to_iri()</code> now avoids recursion when re-percent-encoding invalid UTF-8\noctet sequences.</p>\n</section>","rootId":"django-1-11-23-release-notes","toc":[{"title":"CVE-2019-14232: Denial-of-service possibility in django.utils.text.Truncator","anchor":"cve-2019-14232-denial-of-service-possibility-in-django-utils-text-truncator","children":[]},{"title":"CVE-2019-14233: Denial-of-service possibility in strip_tags()","anchor":"cve-2019-14233-denial-of-service-possibility-in-strip-tags","children":[]},{"title":"CVE-2019-14234: SQL injection possibility in key and index lookups for JSONField/HStoreField","anchor":"cve-2019-14234-sql-injection-possibility-in-key-and-index-lookups-for-jsonfield-hstorefield","children":[]},{"title":"CVE-2019-14235: Potential memory exhaustion in django.utils.encoding.uri_to_iri()","anchor":"cve-2019-14235-potential-memory-exhaustion-in-django-utils-encoding-uri-to-iri","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/1.11.24","title":"Django 1.11.24 release notes","url":"/en/dev/releases/1.11.24/"},"next":{"docname":"releases/1.11.22","title":"Django 1.11.22 release notes","url":"/en/dev/releases/1.11.22/"},"formats":{"html":"/en/dev/releases/1.11.23/","markdown":"/en/dev/releases/1.11.23.md","json":"/en/dev/releases/1.11.23.json"},"source":"https://github.com/django/django/blob/main/docs/releases/1.11.23.txt","official":"https://docs.djangoproject.com/en/dev/releases/1.11.23/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","1.11"],"inLocales":["en"]}