GitHub Advisoryadvisory · PyPI
GHSA-2gwj-7jmv-h26r SQL Injection in Django
CRITICAL
Official page ↗
- Aliases
- CVE-2022-28346
- Ecosystem
- PyPI
- Packages
- Django
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-89
- Reviewed
- 2022-04-22
Affected packages
• PyPI Django: >= 2.2, < 2.2.28 → fixed in 2.2.28
• PyPI Django: >= 3.2, < 3.2.13 → fixed in 3.2.13
• PyPI Django: >= 4.0, < 4.0.4 → fixed in 4.0.4
Description
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`.
Related
Alias · CVE (1)
- CVE-2022-28346 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. vulnerability
Weakness · CWE (1)
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-28346 advisory
- https://github.com/django/django/commit/2044dac5c6968441be6f534c4139bcf48c5c7e48 web
- https://github.com/django/django/commit/2c09e68ec911919360d5f8502cefc312f9e03c5d web
- https://github.com/django/django/commit/800828887a0509ad1162d6d407e94d8de7eafc60 web
- https://github.com/django/django/commit/93cae5cb2f9a4ef1514cf1a41f714fef08005200 web
- https://docs.djangoproject.com/en/4.0/releases/security web
- https://github.com/advisories/GHSA-2gwj-7jmv-h26r advisory
- https://github.com/django/django package
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-190.yaml web
- https://groups.google.com/forum/#!forum/django-announce web
- https://lists.debian.org/debian-lts-announce/2022/04/msg00013.html web
- https://lists.fedoraproject.org/archives/list/[email protected]/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK web
- https://lists.fedoraproject.org/archives/list/[email protected]/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI web
- https://security.netapp.com/advisory/ntap-20220609-0002 web
- https://www.debian.org/security/2022/dsa-5254 web
- https://www.djangoproject.com/weblog/2022/apr/11/security-releases web
- http://www.openwall.com/lists/oss-security/2022/04/11/1 web