{"title":"Django 5.2.6 release notes","version":"dev","locale":"en","docname":"releases/5.2.6","url":"/en/dev/releases/5.2.6/","canonical":"https://djangodocs.dev/en/dev/releases/5.2.6/","summary":"Django 5.2.6 fixes a security issue with severity “high” and one bug in 5.2.5. FilteredRelation was subject to SQL injection in column aliases, using a…","html":"<h1>Django 5.2.6 release notes<a class=\"heading-anchor\" href=\"#django-5-2-6-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>September 3, 2025</em></p>\n<p>Django 5.2.6 fixes a security issue with severity “high” and one bug in 5.2.5.</p>\n<section id=\"cve-2025-57833-potential-sql-injection-in-filteredrelation-column-aliases\">\n<h2>CVE-2025-57833: Potential SQL injection in <code class=\"docutils literal notranslate\">FilteredRelation</code> column aliases<a class=\"heading-anchor\" href=\"#cve-2025-57833-potential-sql-injection-in-filteredrelation-column-aliases\"><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/querysets/#django.db.models.FilteredRelation\" title=\"django.db.models.FilteredRelation\"><code class=\"xref py py-class docutils literal notranslate\">FilteredRelation</code></a> was subject to SQL injection in column aliases,\nusing a suitably crafted dictionary, with dictionary expansion, as the\n<code class=\"docutils literal notranslate\">**kwargs</code> passed to <a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.annotate\" title=\"django.db.models.query.QuerySet.annotate\"><code class=\"xref py py-meth docutils literal notranslate\">QuerySet.annotate()</code></a> or <a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.alias\" title=\"django.db.models.query.QuerySet.alias\"><code class=\"xref py py-meth docutils literal notranslate\">QuerySet.alias()</code></a>.</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 where using <code class=\"docutils literal notranslate\">QuerySet.values()</code> or <code class=\"docutils literal notranslate\">values_list()</code> with a\n<code class=\"docutils literal notranslate\">ForeignObject</code> composed of multiple fields returned incorrect results\ninstead of tuples of the referenced fields (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/36431\">#36431</a>).</p></li>\n</ul>\n</section>","rootId":"django-5-2-6-release-notes","toc":[{"title":"CVE-2025-57833: Potential SQL injection in FilteredRelation column aliases","anchor":"cve-2025-57833-potential-sql-injection-in-filteredrelation-column-aliases","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/5.2.7","title":"Django 5.2.7 release notes","url":"/en/dev/releases/5.2.7/"},"next":{"docname":"releases/5.2.5","title":"Django 5.2.5 release notes","url":"/en/dev/releases/5.2.5/"},"formats":{"html":"/en/dev/releases/5.2.6/","markdown":"/en/dev/releases/5.2.6.md","json":"/en/dev/releases/5.2.6.json"},"source":"https://github.com/django/django/blob/main/docs/releases/5.2.6.txt","official":"https://docs.djangoproject.com/en/dev/releases/5.2.6/","inVersions":["dev","6.1","6.0","5.2"],"inLocales":["en"]}