{"title":"Django 2.2.16 release notes","version":"dev","locale":"en","docname":"releases/2.2.16","url":"/en/dev/releases/2.2.16/","canonical":"https://djangodocs.dev/en/dev/releases/2.2.16/","summary":"Django 2.2.16 fixes two security issues and two data loss bugs in 2.2.15. On Python 3.7+, FILE_UPLOAD_DIRECTORY_PERMISSIONS mode was not applied to…","html":"<h1>Django 2.2.16 release notes<a class=\"heading-anchor\" href=\"#django-2-2-16-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>September 1, 2020</em></p>\n<p>Django 2.2.16 fixes two security issues and two data loss bugs in 2.2.15.</p>\n<section id=\"cve-2020-24583-incorrect-permissions-on-intermediate-level-directories-on-python-3-7\">\n<h2>CVE-2020-24583: Incorrect permissions on intermediate-level directories on Python 3.7+<a class=\"heading-anchor\" href=\"#cve-2020-24583-incorrect-permissions-on-intermediate-level-directories-on-python-3-7\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>On Python 3.7+, <a class=\"reference internal\" href=\"/en/dev/ref/settings/#std-setting-FILE_UPLOAD_DIRECTORY_PERMISSIONS\"><code class=\"xref std std-setting docutils literal notranslate\">FILE_UPLOAD_DIRECTORY_PERMISSIONS</code></a> mode was not\napplied to intermediate-level directories created in the process of uploading\nfiles and to intermediate-level collected static directories when using the\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/staticfiles/#django-admin-collectstatic\"><code class=\"xref std std-djadmin docutils literal notranslate\">collectstatic</code></a> management command.</p>\n<p>You should review and manually fix permissions on existing intermediate-level\ndirectories.</p>\n</section>\n<section id=\"cve-2020-24584-permission-escalation-in-intermediate-level-directories-of-the-file-system-cache-on-python-3-7\">\n<h2>CVE-2020-24584: Permission escalation in intermediate-level directories of the file system cache on Python 3.7+<a class=\"heading-anchor\" href=\"#cve-2020-24584-permission-escalation-in-intermediate-level-directories-of-the-file-system-cache-on-python-3-7\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>On Python 3.7+, the intermediate-level directories of the file system cache had\nthe system’s standard umask rather than <code class=\"docutils literal notranslate\">0o077</code> (no group or others\npermissions).</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 data loss possibility in the\n<a class=\"reference internal\" href=\"/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.select_for_update\" title=\"django.db.models.query.QuerySet.select_for_update\"><code class=\"xref py py-meth docutils literal notranslate\">select_for_update()</code></a>. When using\nrelated fields pointing to a proxy model in the <code class=\"docutils literal notranslate\">of</code> argument, the\ncorresponding model was not locked (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31866\">#31866</a>).</p></li>\n<li><p>Fixed a data loss possibility, following a regression in Django 2.0, when\ncopying model instances with a cached fields value (<a class=\"extlink-ticket reference external\" href=\"https://code.djangoproject.com/ticket/31863\">#31863</a>).</p></li>\n</ul>\n</section>","rootId":"django-2-2-16-release-notes","toc":[{"title":"CVE-2020-24583: Incorrect permissions on intermediate-level directories on Python 3.7+","anchor":"cve-2020-24583-incorrect-permissions-on-intermediate-level-directories-on-python-3-7","children":[]},{"title":"CVE-2020-24584: Permission escalation in intermediate-level directories of the file system cache on Python 3.7+","anchor":"cve-2020-24584-permission-escalation-in-intermediate-level-directories-of-the-file-system-cache-on-python-3-7","children":[]},{"title":"Bugfixes","anchor":"bugfixes","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/2.2.17","title":"Django 2.2.17 release notes","url":"/en/dev/releases/2.2.17/"},"next":{"docname":"releases/2.2.15","title":"Django 2.2.15 release notes","url":"/en/dev/releases/2.2.15/"},"formats":{"html":"/en/dev/releases/2.2.16/","markdown":"/en/dev/releases/2.2.16.md","json":"/en/dev/releases/2.2.16.json"},"source":"https://github.com/django/django/blob/main/docs/releases/2.2.16.txt","official":"https://docs.djangoproject.com/en/dev/releases/2.2.16/","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"],"inLocales":["en"]}