What’s Vulnerable › Vulnerabilities
CVE-2022-28347: SQL Injection in Django
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 2.9% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-04-12 · updated 2026-06-17
- Weakness: CWE-89
Description
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.
Affected products
- Debian Linux: 11.0
- Django: from 2.2 before 2.2.28; from 3.2 before 3.2.13; from 4.0 before 4.0.4 — fixed in 2.2.28, 3.2.13, 4.0.4
- Pypi Django: from 4.0 before 4.0.4; from 3.2 before 3.2.13; from 2.2 before 2.2.28; 2.2, 2.2.1, 2.2.10, 2.2.11, 2.2.12, 2.2.13 (+39) — fixed in 4.0.4, 3.2.13, 2.2.28
How to fix
Upgrade to a fixed version: Django 2.2.28, 3.2.13, 4.0.4; Pypi Django 4.0.4, 3.2.13, 2.2.28. Check the vendor advisory for mitigations.
References
- http://www.openwall.com/lists/oss-security/2022/04/11/1
- https://docs.djangoproject.com/en/4.0/releases/security/
- https://groups.google.com/forum/#%21forum/django-announce
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/
- https://www.debian.org/security/2022/dsa-5254
- https://www.djangoproject.com/weblog/2022/apr/11/security-releases/
- http://www.openwall.com/lists/oss-security/2022/04/11/1
- https://docs.djangoproject.com/en/4.0/releases/security/
- https://groups.google.com/forum/#%21forum/django-announce
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/
Get alerted when CVE-2022-28347 or the next vulnerability affects your stack