
===================================================================
                                CERT-Renater

                     Note d'Information No. 2022/VULN147
______________________________________________________________________

DATE                : 12/04/2022

HARDWARE PLATFORM(S): /

OPERATING SYSTEM(S) : Systems running Django versions prior to 4.0.4,
                                      3.2.13, 2.2.28.

=====================================================================
https://www.djangoproject.com/weblog/2022/apr/11/security-releases/
_______________________________________________________________________

Django security releases issued: 4.0.4, 3.2.13, and 2.2.28
Posted by Mariusz Felisiak on avril 11, 2022


In accordance with our security release policy, the Django team is
issuing Django 4.0.4, Django 3.2.13, and Django 2.2.28. These release
addresses the security issues detailed below. We encourage all users of
Django to upgrade as soon as possible.

Django 2.2 has reached the end of extended support. The final security
release (2.2.28) was issued today. All Django 2.2 users are encouraged
to upgrade to Django 3.2 or later.


CVE-2022-28346: Potential SQL injection in QuerySet.annotate(),
aggregate(), and extra()

QuerySet.annotate(), aggregate(), and extra() methods were subject to
SQL injection in column aliases, using a suitably crafted dictionary,
with dictionary expansion, as the **kwargs passed to these methods.

Thanks Splunk team: Preston Elder, Jacob Davis, Jacob Moore, Matt
Hanson, David Briggs, and a security researcher: Danylo Dmytriiev
(DDV_UA) for the report.

This issue has severity "high" according to the Django security policy.


CVE-2022-28347: Potential SQL injection via QuerySet.explain(**options)
on PostgreSQL QuerySet.explain() method was subject to SQL injection in
option names, using a suitably crafted dictionary, with dictionary
expansion, as the **options argument.

This issue has severity "high" according to the Django security policy.


Affected supported versions


Django main branch
Django 4.0
Django 3.2
Django 2.2


Resolution

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


CVE-2022-28346:

On the main branch
On the 4.0 release branch
On the 3.2 release branch
On the 2.2 release branch

CVE-2022-28347:

On the main branch
On the 4.0 release branch
On the 3.2 release branch
On the 2.2 release branch


The following releases have been issued:

Django 4.0.4 (download Django 4.0.4 | 4.0.4 checksums)
Django 3.2.13 (download Django 3.2.13 | 3.2.13 checksums)
Django 2.2.28 (download Django 2.2.28 | 2.2.28 checksums)
The PGP key ID used for this release is Mariusz Felisiak: 2EF56372BA48CD1B.


General notes regarding security reporting

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



=========================================================
+ CERT-RENATER       |    tel : 01-53-94-20-44          +
+ 23/25 Rue Daviel   |    fax : 01-53-94-20-41          +
+ 75013 Paris        |    email:cert@support.renater.fr +
=========================================================

