{"title":"Django 3.1.13 release notes","version":"dev","locale":"en","docname":"releases/3.1.13","url":"/en/dev/releases/3.1.13/","canonical":"https://djangodocs.dev/en/dev/releases/3.1.13/","summary":"Django 3.1.13 fixes a security issue with severity “high” in 3.1.12. Unsanitized user input passed to QuerySet.order_by() could bypass intended column…","html":"<h1>Django 3.1.13 release notes<a class=\"heading-anchor\" href=\"#django-3-1-13-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>July 1, 2021</em></p>\n<p>Django 3.1.13 fixes a security issue with severity “high” in 3.1.12.</p>\n<section id=\"cve-2021-35042-potential-sql-injection-via-unsanitized-queryset-order-by-input\">\n<h2>CVE-2021-35042: Potential SQL injection via unsanitized <code class=\"docutils literal notranslate\">QuerySet.order_by()</code> input<a class=\"heading-anchor\" href=\"#cve-2021-35042-potential-sql-injection-via-unsanitized-queryset-order-by-input\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Unsanitized user input passed to <code class=\"docutils literal notranslate\">QuerySet.order_by()</code> could bypass intended\ncolumn reference validation in path marked for deprecation resulting in a\npotential SQL injection even if a deprecation warning is emitted.</p>\n<p>As a mitigation the strict column reference validation was restored for the\nduration of the deprecation period. This regression appeared in 3.1 as a side\neffect of fixing <a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31426\">#31426</a>.</p>\n<p>The issue is not present in the main branch as the deprecated path has been\nremoved.</p>\n</section>","rootId":"django-3-1-13-release-notes","toc":[{"title":"CVE-2021-35042: Potential SQL injection via unsanitized QuerySet.order_by() input","anchor":"cve-2021-35042-potential-sql-injection-via-unsanitized-queryset-order-by-input","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/3.1.14","title":"Django 3.1.14 release notes","url":"/en/dev/releases/3.1.14/"},"next":{"docname":"releases/3.1.12","title":"Django 3.1.12 release notes","url":"/en/dev/releases/3.1.12/"},"formats":{"html":"/en/dev/releases/3.1.13/","markdown":"/en/dev/releases/3.1.13.md","json":"/en/dev/releases/3.1.13.json"},"source":"https://github.com/django/django/blob/main/docs/releases/3.1.13.txt","official":"https://docs.djangoproject.com/en/dev/releases/3.1.13/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1"],"inLocales":["en"]}