CVE-2022-28346Djangoproject Django
Critical 9.8 No auth neededHigh EPSS
Follow: this CVE · Djangoproject · Djangoproject Django We alert you by email or Slack (account required).
- Priority
- 75
- CVSS 3.1
- 9.8
- EPSS
- 14.8% probability of exploitation in 30 days · percentile 97
- Auth required
- No
- Published
- Apr 12, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
An issue was discovered in Django 2.2 before 2.2.28, 3.2 before 3.2.13, and 4.0 before 4.0.4. QuerySet.annotate(), aggregate(), and extra() methods are subject to SQL injection in column aliases via a crafted dictionary (with dictionary expansion) as the passed **kwargs.
What to do
- Apply the vendor's security update for Django.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | django |
≥ 2.2 < 2.2.28 |
2.2.28 |
pip install "django>=2.2.28" |
| PyPI | django |
≥ 3.2 < 3.2.13 |
3.2.13 |
pip install "django>=3.2.13" |
| PyPI | django |
≥ 4.0 < 4.0.4 |
4.0.4 |
pip install "django>=4.0.4" |
| PyPI | django |
≥ 4.0 < 4.0.4 |
4.0.4 |
pip install "django>=4.0.4" |
| PyPI | django |
≥ 3.2 < 3.2.13 |
3.2.13 |
pip install "django>=3.2.13" |
| PyPI | django |
≥ 2.2 < 2.2.28 |
2.2.28 |
pip install "django>=2.2.28" |
Per OSV / GitHub Advisories (GHSA-2gwj-7jmv-h26r, PYSEC-2022-190). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| djangoproject | django | ≥ 2.2 < 2.2.28 |
| djangoproject | django | ≥ 3.2 < 3.2.13 |
| djangoproject | django | ≥ 4.0 < 4.0.4 |
| debian | debian_linux | 9.0 |
| debian | debian_linux | 11.0 |
Official advisories
- python313-Django5-5.2.16-1.1 on GA media · SUSE · openSUSE-SU-2026:11270-1 · Jul 14, 2026 Critical
- python313-Django4-4.2.30-4.1 on GA media · SUSE · openSUSE-SU-2026:11235-1 · Jul 9, 2026 Critical
- python312-Django6-6.0-1.1 on GA media · SUSE · openSUSE-SU-2026:10005-1 · Jan 3, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- www.openwall.com Mailing List Patch Third Party Advisory
- docs.djangoproject.com Patch Vendor Advisory
- groups.google.com
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- security.netapp.com Third Party Advisory
- www.debian.org Third Party Advisory
- www.djangoproject.com Patch Vendor Advisory