{"title":"Django 2.1.9 release notes","version":"dev","locale":"en","docname":"releases/2.1.9","url":"/en/dev/releases/2.1.9/","canonical":"https://djangodocs.dev/en/dev/releases/2.1.9/","summary":"Django 2.1.9 fixes security issues in 2.1.8. The clickable “Current URL” link generated by AdminURLFieldWidget displayed the provided value without…","html":"<h1>Django 2.1.9 release notes<a class=\"heading-anchor\" href=\"#django-2-1-9-release-notes\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><em>June 3, 2019</em></p>\n<p>Django 2.1.9 fixes security issues in 2.1.8.</p>\n<section id=\"cve-2019-12308-adminurlfieldwidget-xss\">\n<h2>CVE-2019-12308: AdminURLFieldWidget XSS<a class=\"heading-anchor\" href=\"#cve-2019-12308-adminurlfieldwidget-xss\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>The clickable “Current URL” link generated by <code class=\"docutils literal notranslate\">AdminURLFieldWidget</code> displayed\nthe provided value without validating it as a safe URL. Thus, an unvalidated\nvalue stored in the database, or a value provided as a URL query parameter\npayload, could result in an clickable JavaScript link.</p>\n<p><code class=\"docutils literal notranslate\">AdminURLFieldWidget</code> now validates the provided value using\n<a class=\"reference internal\" href=\"/en/dev/ref/validators/#django.core.validators.URLValidator\" title=\"django.core.validators.URLValidator\"><code class=\"xref py py-class docutils literal notranslate\">URLValidator</code></a> before displaying the clickable\nlink. You may customize the validator by passing a <code class=\"docutils literal notranslate\">validator_class</code> kwarg to\n<code class=\"docutils literal notranslate\">AdminURLFieldWidget.__init__()</code>, e.g. when using\n<a class=\"reference internal\" href=\"/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.formfield_overrides\" title=\"django.contrib.admin.ModelAdmin.formfield_overrides\"><code class=\"xref py py-attr docutils literal notranslate\">formfield_overrides</code></a>.</p>\n</section>\n<section id=\"patched-bundled-jquery-for-cve-2019-11358-prototype-pollution\">\n<h2>Patched bundled jQuery for CVE-2019-11358: Prototype pollution<a class=\"heading-anchor\" href=\"#patched-bundled-jquery-for-cve-2019-11358-prototype-pollution\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>jQuery before 3.4.0, mishandles <code class=\"docutils literal notranslate\">jQuery.extend(true, {}, ...)</code> because of\n<code class=\"docutils literal notranslate\">Object.prototype</code> pollution. If an unsanitized source object contained an\nenumerable <code class=\"docutils literal notranslate\">__proto__</code> property, it could extend the native\n<code class=\"docutils literal notranslate\">Object.prototype</code>.</p>\n<p>The bundled version of jQuery used by the Django admin has been patched to\nallow for the <code class=\"docutils literal notranslate\">select2</code> library’s use of <code class=\"docutils literal notranslate\">jQuery.extend()</code>.</p>\n</section>","rootId":"django-2-1-9-release-notes","toc":[{"title":"CVE-2019-12308: AdminURLFieldWidget XSS","anchor":"cve-2019-12308-adminurlfieldwidget-xss","children":[]},{"title":"Patched bundled jQuery for CVE-2019-11358: Prototype pollution","anchor":"patched-bundled-jquery-for-cve-2019-11358-prototype-pollution","children":[]}],"breadcrumbs":[{"docname":"releases/index","title":"Release notes","url":"/en/dev/releases/"}],"prev":{"docname":"releases/2.1.10","title":"Django 2.1.10 release notes","url":"/en/dev/releases/2.1.10/"},"next":{"docname":"releases/2.1.8","title":"Django 2.1.8 release notes","url":"/en/dev/releases/2.1.8/"},"formats":{"html":"/en/dev/releases/2.1.9/","markdown":"/en/dev/releases/2.1.9.md","json":"/en/dev/releases/2.1.9.json"},"source":"https://github.com/django/django/blob/main/docs/releases/2.1.9.txt","official":"https://docs.djangoproject.com/en/dev/releases/2.1.9/","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"],"inLocales":["en"]}