{"id":"CVE-2020-7471","aliases":["CVE-2020-7471","GHSA-hmr4-m2h5-33qx","BIT-DJANGO-2020-7471","PYSEC-2020-35"],"related":[],"kind":"vulnerability","state":"published","title":"SQL injection in Django","summary":"Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). By passing a suitably crafted delimiter to a contrib.postgres.aggregates.StringAgg instance, it was possible to break escaping and inject malicious SQL.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). By passing a suitably crafted delimiter to a contrib.postgres.aggregates.StringAgg instance, it was possible to break escaping and inject malicious SQL.","source":"cvelist"},{"lang":"es","text":"Django versiones 1.11 anteriores a 1.11.28, versiones 2.2 anteriores a 2.2.10 y versiones 3.0 anteriores a 3.0.3, permite una Inyección SQL si se usan datos no confiables como un delimitador de StringAgg (por ejemplo, en aplicaciones Django que ofrecen descargas de datos como una serie de filas con un delimitador de columna especificado por el usuario). Al pasar un delimitador apropiadamente diseñado a una instancia contrib.postgres.aggregates.StringAgg, fue posible romper el escape e inyectar SQL malicioso.","source":"nvd"}],"published":"2020-02-03T11:59:20.000Z","modified":"2026-09-08T08:46:23.606Z","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":"0","status":"affected","fixed":"1.11.28"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0","status":"affected","fixed":"2.2.10"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.0","status":"affected","fixed":"3.0.3"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.11","fixed":"1.11.28"},{"status":"affected","introduced":"2.2","fixed":"2.2.10"},{"status":"affected","introduced":"3.0","fixed":"3.0.3"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"eb31d845323618d688ad429479c6dda973056136"},{"type":"ecosystem","introduced":"1.11","status":"affected","fixed":"1.11.28"},{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.10"},{"type":"ecosystem","introduced":"3.0","status":"affected","fixed":"3.0.3"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","repo":"https://github.com/django/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"1.11.0","status":"affected","fixed":"1.11.28"},{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.10"},{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.3"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI","tags":["web","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/3.0/releases/security/","tags":["advisory","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://www.openwall.com/lists/oss-security/2020/02/03/1","tags":["advisory","mailing-list","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2020/feb/03/security-releases/","tags":["advisory","article","vendor-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"http://www.openwall.com/lists/oss-security/2020/02/03/1","tags":["advisory","mailing-list","third-party-advisory","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136","tags":["advisory","fix","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://usn.ubuntu.com/4264-1/","tags":["vendor-advisory","web","x-refsource-ubuntu","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://seclists.org/bugtraq/2020/Feb/30","tags":["mailing-list","web","x-refsource-bugtraq","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://www.debian.org/security/2020/dsa-4629","tags":["advisory","vendor-advisory","web","x-refsource-debian","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20200221-0006/","tags":["advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://security.gentoo.org/glsa/202004-17","tags":["advisory","vendor-advisory","web","x-refsource-gentoo","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ/","tags":["vendor-advisory","web","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7471","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/001b0634cd309e372edb6d7d95d083d02b8e37bd","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/505826b469b16ab36693360da9e11fd13213421b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/c67a368c16e4680b324b4f385398d638db4d8147","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2020/feb/03/security-releases","tags":["web"],"sources":["ghsa"]},{"url":"https://usn.ubuntu.com/4264-1","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20200221-0006","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!topic/django-announce/X45S86X5bZI","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-35.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-hmr4-m2h5-33qx","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://docs.djangoproject.com/en/3.0/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ/","tags":["web"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-7471","url":"https://www.cve.org/CVERecord?id=CVE-2020-7471","licence":"CVE Terms of Use","modified":"2024-08-04T09:33:19.635Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hmr4-m2h5-33qx","url":"https://github.com/advisories/GHSA-hmr4-m2h5-33qx","licence":"CC-BY-4.0","modified":"2025-02-21T06:12:43.981Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-7471","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-7471","licence":"Public domain","modified":"2026-06-17T03:24:50.777Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2020-35","url":"https://osv.dev/vulnerability/PYSEC-2020-35","licence":"CC-BY-4.0","modified":"2023-12-06T01:00:38.606Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2020-7471","url":"https://osv.dev/vulnerability/BIT-DJANGO-2020-7471","licence":"Apache-2.0","modified":"2026-09-08T08:46:23.606Z"}],"updatedAt":"2026-11-25T22:57:50.738Z","epss":{"score":0.65575,"percentile":0.99276,"date":"2026-12-01T12:00:22.000Z"}}