Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <4BDB3183-6E14-41DC-AE08-D67E551EF3B7@gmail.com>
Date: Wed, 2 Jun 2021 11:34:09 +0200
From: Carlton Gibson <carlton.gibson@...il.com>
To: oss-security@...ts.openwall.com
Subject: Django security releases 3.2.4, 3.1.12, and 2.2.24 for CVE-2021-33203
 and CVE-2021-33571

In accordance with `our security release policy
<https://docs.djangoproject.com/en/dev/internals/security/>`_, the Django team
is issuing
`Django 3.2.4 <https://docs.djangoproject.com/en/dev/releases/3.2.4/>`_,
`Django 3.1.12 <https://docs.djangoproject.com/en/dev/releases/3.1.12/>`_, and
`Django 2.2.24 <https://docs.djangoproject.com/en/dev/releases/2.2.24/>`_.
These release addresses the security issue detailed below. We encourage all
users of Django to upgrade as soon as possible.

CVE-2021-33203: Potential directory traversal via ``admindocs``
===============================================================

Staff members could use the ``admindocs``
``TemplateDetailView`` view to check the existence of arbitrary files.
Additionally, if (and only if) the default admindocs templates have been
customized by the developers to also expose the file contents, then not only
the existence but also the file contents would have been exposed.

As a mitigation, path sanitation is now applied and only files within the
template root directories can be loaded.

This issue has low severity, according to the Django security policy.

Thanks to Rasmus Lerchedahl Petersen and Rasmus Wriedt Larsen from the CodeQL Python team for the report.

CVE-2021-33571: Possible indeterminate SSRF, RFI, and LFI attacks since validators accepted leading zeros in IPv4 addresses
===========================================================================================================================

``URLValidator``, ``validate_ipv4_address()``, and ``validate_ipv46_address()``
didn't prohibit leading zeros in octal literals. If you used such values you
could suffer from indeterminate SSRF, RFI, and LFI attacks.

``validate_ipv4_address()`` and ``validate_ipv46_address()`` validators were not
affected on Python 3.9.5+.

This issue has medium severity, according to the Django security policy.

Affected supported versions
===========================

* Django main branch
* Django 3.2
* Django 3.1
* Django 2.2

Resolution
==========

Patches to resolve the issue have been applied to Django's main branch and to
the 3.2, 3.1, and 2.2 release branches. The patches may be obtained from the
following changesets.

CVE-2021-33203:

* On the `main branch <https://github.com/django/django/commit/46572de2e92fdeaf047f80c44d52269e54ad68db>`__
* On the `3.2 release branch <https://github.com/django/django/commit/dfaba12cda060b8b292ae1d271b44bf810b1c5b9>`__
* On the `3.1 release branch <https://github.com/django/django/commit/20c67a0693c4ede2b09af02574823485e82e4c8f>`__
* On the `2.2 release branch <https://github.com/django/django/commit/053cc9534d174dc89daba36724ed2dcb36755b90>`__

CVE-2021-33571:

* On the `main branch <https://github.com/django/django/commit/e1d787f1b36d13b95187f8f425425ae1b98da188>`__
* On the `3.2 release branch <https://github.com/django/django/commit/9f75e2e562fa0c0482f3dde6fc7399a9070b4a3d>`__
* On the `3.1 release branch <https://github.com/django/django/commit/203d4ab9ebcd72fc4d6eb7398e66ed9e474e118e>`__
* On the `2.2 release branch <https://github.com/django/django/commit/f27c38ab5d90f68c9dd60cabef248a570c0be8fc>`__

The following releases have been issued:

* Django 3.2.4 (`download Django 3.2.4 <https://www.djangoproject.com/m/releases/3.2/Django-3.2.4.tar.gz>`_ | `3.2.4 checksums <https://www.djangoproject.com/m/pgp/Django-3.2.4.checksum.txt>`_)
* Django 3.1.12 (`download Django 3.1.12 <https://www.djangoproject.com/m/releases/3.1/Django-3.1.12.tar.gz>`_ | `3.1.12 checksums <https://www.djangoproject.com/m/pgp/Django-3.1.12.checksum.txt>`_)
* Django 2.2.24 (`download Django 2.2.24 <https://www.djangoproject.com/m/releases/2.2/Django-2.2.24.tar.gz>`_ | `2.2.24 checksums <https://www.djangoproject.com/m/pgp/Django-2.2.24.checksum.txt>`_)

The PGP key ID used for these releases is Carlton Gibson: `E17DF5C82B4F9D00
<https://github.com/carltongibson.gpg>`_.

General notes regarding security reporting
==========================================

As always, we ask that potential security issues be reported via
private email to ``security@...ngoproject.com``, and not via Django's
Trac instance or the django-developers list. Please see `our security
policies <https://www.djangoproject.com/security/>`_ for further
information.
 

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.