CVE-2020-7471
CRITICAL 9.8CVSS 3.1SQL injection in Django
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.
- Published
- 3 Feb 2020
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-89
- Also known as
- BIT-django-2020-7471GHSA-hmr4-m2h5-33qxPYSEC-2020-35
- Sources
- NVDJSONOSV GHSA-hmr4-m2h5-33qxJSONOSV PYSEC-2020-35JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 1.11, < 1.11.28 | 1.11.28 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 2.2, < 2.2.10 | 2.2.10 |
| NVD | djangoproject | djangocpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* |
>= 3.0, < 3.0.3 | 3.0.3 |
| OSV | PyPI | django | < 1.11.28 | 1.11.28 |
| OSV | PyPI | django | >= 2.0, < 2.2.10 | 2.2.10 |
| OSV | PyPI | django | >= 3.0, < 3.0.3 | 3.0.3 |
| OSV | PyPI | django | >= 1.11, < 1.11.28; >= 2.2, < 2.2.10; >= 3.0, < 3.0.3 | 1.11.28, 2.2.10, 3.0.3 |
References
- http://www.openwall.com/lists/oss-security/2020/02/03/1 · Mailing List, Third Party Advisory, WEB
- https://docs.djangoproject.com/en/3.0/releases/security/ · Vendor Advisory, WEB
- https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136 · Patch, Third Party Advisory, WEB, FIX
- https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ/
- https://seclists.org/bugtraq/2020/Feb/30 · WEB
- https://security.gentoo.org/glsa/202004-17 · WEB, ADVISORY
- https://security.netapp.com/advisory/ntap-20200221-0006/ · WEB, ADVISORY
- https://usn.ubuntu.com/4264-1/ · WEB
- https://www.debian.org/security/2020/dsa-4629 · WEB, ADVISORY
- https://www.djangoproject.com/weblog/2020/feb/03/security-releases/ · Vendor Advisory, WEB, ARTICLE
- https://www.openwall.com/lists/oss-security/2020/02/03/1 · Mailing List, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2020-7471 · ADVISORY
- https://github.com/django/django/commit/001b0634cd309e372edb6d7d95d083d02b8e37bd · WEB
- https://github.com/django/django/commit/505826b469b16ab36693360da9e11fd13213421b · WEB
- https://github.com/django/django/commit/c67a368c16e4680b324b4f385398d638db4d8147 · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ · WEB
- https://groups.google.com/forum/#!topic/django-announce/X45S86X5bZI · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-35.yaml · WEB
- https://github.com/django/django · PACKAGE
- https://github.com/advisories/GHSA-hmr4-m2h5-33qx · ADVISORY
History
- 25 Nov 2026 20:31 UTC · NVD: first stored (published 3 Feb 2020)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 3 Feb 2020)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 11 Feb 2020)