{"id":"CVE-2022-28346","aliases":["CVE-2022-28346","GHSA-2gwj-7jmv-h26r","BIT-DJANGO-2022-28346","PYSEC-2022-190"],"related":[],"kind":"vulnerability","state":"published","title":"SQL Injection in Django","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Se ha detectado un problema en Django versiones 2.2 anteriores a 2.2.28, 3.2 anteriores a 3.2.13 y 4.0 anteriores a 4.0.4. Los métodos QuerySet.annotate(), aggregate() y extra() están sujetos a inyección SQL en los alias de columna por medio de un diccionario diseñado (con expansión de diccionario) como los **kwargs pasados","source":"nvd"}],"published":"2022-04-12T00:00:00.000Z","modified":"2026-09-08T08:46:32.563Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.28"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.13"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0","status":"affected","fixed":"4.0.4"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.2","fixed":"2.2.28"},{"status":"affected","introduced":"3.2","fixed":"3.2.13"},{"status":"affected","introduced":"4.0","fixed":"4.0.4"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"},{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"4.0","status":"affected","fixed":"4.0.4"},{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.13"},{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.28"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.28"},{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"3.2.13"},{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.0.4"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security/","tags":["advisory","patch","vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2022/04/11/1","tags":["advisory","mailing-list","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2022/apr/11/security-releases/","tags":["advisory","article","patch","vendor-advisory","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/04/msg00013.html","tags":["advisory","mailing-list","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20220609-0002/","tags":["advisory","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://www.debian.org/security/2022/dsa-5254","tags":["advisory","third-party-advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-28346","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/2044dac5c6968441be6f534c4139bcf48c5c7e48","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/2c09e68ec911919360d5f8502cefc312f9e03c5d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/800828887a0509ad1162d6d407e94d8de7eafc60","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/93cae5cb2f9a4ef1514cf1a41f714fef08005200","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-2gwj-7jmv-h26r","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-190.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HWY6DQWRVBALV73BPUVBXC3QIYUM24IK","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LTZVAKU5ALQWOKFTPISE257VCVIYGFQI","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20220609-0002","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2022/apr/11/security-releases","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-28346","url":"https://www.cve.org/CVERecord?id=CVE-2022-28346","licence":"CVE Terms of Use","modified":"2025-02-13T16:32:33.638Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2gwj-7jmv-h26r","url":"https://github.com/advisories/GHSA-2gwj-7jmv-h26r","licence":"CC-BY-4.0","modified":"2025-02-21T05:41:10.759Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-28346","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-28346","licence":"Public domain","modified":"2026-06-17T04:38:24.500Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-190","url":"https://osv.dev/vulnerability/PYSEC-2022-190","licence":"CC-BY-4.0","modified":"2023-12-06T01:02:11.594Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2022-28346","url":"https://osv.dev/vulnerability/BIT-DJANGO-2022-28346","licence":"Apache-2.0","modified":"2026-09-08T08:46:32.563Z"}],"updatedAt":"2026-11-25T22:58:10.547Z","epss":{"score":0.18661,"percentile":0.97333,"date":"2026-12-01T12:00:22.000Z"}}