CVE-2022-28347
SQL Injection in Django
Reported by mitre · Published April 12, 2022
django is fixed in 4.0.4, 3.2.13 and 2.2.28 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| django | PyPI | 4.0.4, 3.2.13, 2.2.28 |
| django | djangoproject | 4.0.4, 3.2.13, 2.2.28 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| n/a | n/a | * |
| alpine | py3-django | 0 |
| PyPI | Django | 2.2, 3.2, 4.0 |
| arch | python-django | 0 |
Timeline
- Apr 12, 2022 CVE Published
- Apr 12, 2022 EPSS Score (30 in total, the first dated here)
- Feb 21, 2025 CVE Updated
- Mar 9, 2026 Security Advisory (3 in total, the first dated here)
- Jun 27, 2026 Coalition ESS Score
- Oct 31, 2026 Distribution Patch
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-28347
vulnetix vdb fixes CVE-2022-28347
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-28347/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- DSA-5254 vendor-advisory
- FEDORA-2023-8fed428c5e vendor-advisory
- FEDORA-2023-a53ab7c969 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-28347 advisory
- https://github.com/advisories/GHSA-w24h-v9qh-8gxj advisory
- https://github.com/django/django/commit/00b0fc50e1738c7174c495464a5ef069408a4402 patch
- https://github.com/django/django/commit/29a6c98b4c13af82064f993f0acc6e8fafa4d3f5 patch
- https://github.com/django/django/commit/6723a26e59b0b5429a0c5873941e01a2e1bdbb81 patch
- https://github.com/django/django/commit/9e19accb6e0a00ba77d5a95a91675bf18877c72d patch
- https://docs.djangoproject.com/en/4.0/releases/security url
- https://github.com/django/django url
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-191.yaml advisory
- https://groups.google.com/forum/#!forum/django-announce url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI url
- https://www.djangoproject.com/weblog/2022/apr/11/security-releases url