{"title":"Django 4.0.6 release notes","version":"dev","locale":"en","docname":"releases/4.0.6","url":"/en/dev/releases/4.0.6/","canonical":"https://djangodocs.dev/en/dev/releases/4.0.6/","summary":"Django 4.0.6 fixes a security issue with severity “high” in 4.0.5. Trunc() and Extract() database functions were subject to SQL injection if untrusted data…","html":"<h1>Django 4.0.6 release notes<a class=\"heading-anchor\" href=\"#django-4-0-6-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>July 4, 2022</em></p>\n<p>Django 4.0.6 fixes a security issue with severity “high” in 4.0.5.</p>\n<section id=\"cve-2022-34265-potential-sql-injection-via-trunc-kind-and-extract-lookup-name-arguments\">\n<h2>CVE-2022-34265: Potential SQL injection via <code class=\"docutils literal notranslate\">Trunc(kind)</code> and <code class=\"docutils literal notranslate\">Extract(lookup_name)</code> arguments<a class=\"heading-anchor\" href=\"#cve-2022-34265-potential-sql-injection-via-trunc-kind-and-extract-lookup-name-arguments\"><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/ref/models/database-functions/#django.db.models.functions.Trunc\" title=\"django.db.models.functions.Trunc\"><code class=\"xref py py-class docutils literal notranslate\">Trunc()</code></a> and\n<a class=\"reference internal\" href=\"/en/dev/ref/models/database-functions/#django.db.models.functions.Extract\" title=\"django.db.models.functions.Extract\"><code class=\"xref py py-class docutils literal notranslate\">Extract()</code></a> database functions were\nsubject to SQL injection if untrusted data was used as a\n<code class=\"docutils literal notranslate\">kind</code>/<code class=\"docutils literal notranslate\">lookup_name</code> value.</p>\n<p>Applications that constrain the lookup name and kind choice to a known safe\nlist are unaffected.</p>\n</section>","rootId":"django-4-0-6-release-notes","toc":[{"title":"CVE-2022-34265: Potential SQL injection via Trunc(kind) and Extract(lookup_name) arguments","anchor":"cve-2022-34265-potential-sql-injection-via-trunc-kind-and-extract-lookup-name-arguments","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/4.0.7","title":"Django 4.0.7 release notes","url":"/en/dev/releases/4.0.7/"},"next":{"docname":"releases/4.0.5","title":"Django 4.0.5 release notes","url":"/en/dev/releases/4.0.5/"},"formats":{"html":"/en/dev/releases/4.0.6/","markdown":"/en/dev/releases/4.0.6.md","json":"/en/dev/releases/4.0.6.json"},"source":"https://github.com/django/django/blob/main/docs/releases/4.0.6.txt","official":"https://docs.djangoproject.com/en/dev/releases/4.0.6/","inVersions":["dev","6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0"],"inLocales":["en"]}