A SQL injection issue was discovered in QuerySet.explain() in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. This occurs by passing a crafted dictionary (with dictionary expansion) as the **options argument, and placing the injection payload in an option name.
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-28347
- https://docs.djangoproject.com/en/4.0/releases/security/
- https://groups.google.com/forum/#!forum/django-announce
- https://www.djangoproject.com/weblog/2022/apr/11/security-releases/
- http://www.openwall.com/lists/oss-security/2022/04/11/1
- https://github.com/django/django/commit/6723a26e59b0b5429a0c5873941e01a2e1bdbb81
- https://github.com/advisories/GHSA-w24h-v9qh-8gxj