Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection…
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 8 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-89.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | Django (PyPI) | before 1.11.28 | 1.11.28 | Patch available | GHSA-hmr4-m2h5-33qx |
| — | Django (PyPI) | 2.0 to before 2.2.10 | 2.2.10 | Patch available | GHSA-hmr4-m2h5-33qx |
| — | Django (PyPI) | 3.0 to before 3.0.3 | 3.0.3 | Patch available | GHSA-hmr4-m2h5-33qx |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- Django (PyPI) Vendor— Affected before 1.11.28 Fixed in 1.11.28 Patch available GHSA-hmr4-m2h5-33qx
- Django (PyPI) Vendor— Affected 2.0 to before 2.2.10 Fixed in 2.2.10 Patch available GHSA-hmr4-m2h5-33qx
- Django (PyPI) Vendor— Affected 3.0 to before 3.0.3 Fixed in 3.0.3 Patch available GHSA-hmr4-m2h5-33qx
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | 1.11 to before 1.11.28; 2.2 to before 2.2.10; 3.0 to before 3.0.3 | Vulnerable | djangoproject |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 1.11 to before 1.11.28; 2.2 to before 2.2.10; 3.0 to before 3.0.3 Vulnerable ·djangoproject
Remediation
- Fix · GHSA-hmr4-m2h5-33qx Django (PyPI) Fixed in 1.11.28 Advisory →
- Fix · GHSA-hmr4-m2h5-33qx Django (PyPI) Fixed in 2.2.10 Advisory →
- Fix · GHSA-hmr4-m2h5-33qx Django (PyPI) Fixed in 3.0.3 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ceph Storage 2 | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 10 (Newton) | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix yet: Fix deferred |
| Red Hat OpenStack Platform 15 (Stein) | Affected | No fix yet: Fix deferred |
| Red Hat OpenStack Platform 16 (Train) | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
| Red Hat Storage 3 | Affected | No fix yet: Fix deferred |
| Red Hat Update Infrastructure 3 for Cloud Providers | Affected | No fix planned: Will not fix |
Not affected: 2 products
- Red Hat Ceph Storage 3
- Red Hat Certification for Red Hat Enterprise Linux 7
Timeline
- 2026-10-02 Threatist record created from CVE-2020-7471
- 2026-10-03 Alias added: GHSA-hmr4-m2h5-33qx
References
Advisory 10
- https://docs.djangoproject.com/en/3.0/releases/security/
- https://www.openwall.com/lists/oss-security/2020/02/03/1
- https://www.djangoproject.com/weblog/2020/feb/03/security-releases/
- [oss-security] 20200203 Django 3.0.3, 2.2.10 and 1.11.28: CVE-2020-7471: Potential SQL injection via ``StringAgg(delimiter)``
- USN-4264-1
- DSA-4629
- GLSA-202004-17
- FEDORA-2020-c2639662af
- https://nvd.nist.gov/vuln/detail/CVE-2020-7471
- https://github.com/advisories/GHSA-hmr4-m2h5-33qx
Other 14
- https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI
- 20200219 [SECURITY] [DSA 4629-1] python-django security update
- https://security.netapp.com/advisory/ntap-20200221-0006/
- https://github.com/django/django/commit/001b0634cd309e372edb6d7d95d083d02b8e37bd
- https://github.com/django/django/commit/505826b469b16ab36693360da9e11fd13213421b
- https://github.com/django/django/commit/c67a368c16e4680b324b4f385398d638db4d8147
- https://www.djangoproject.com/weblog/2020/feb/03/security-releases
- https://usn.ubuntu.com/4264-1
- https://security.netapp.com/advisory/ntap-20200221-0006
- https://lists.fedoraproject.org/archives/list/[email protected]/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ
- https://groups.google.com/forum/#!topic/django-announce/X45S86X5bZI
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-35.yaml
- https://github.com/django/django
- https://docs.djangoproject.com/en/3.0/releases/security
More djangoproject Django vulnerabilities
- TI-2022-15177 An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. CVSS 3.1CRITICAL 9.8
- TI-2023-10198 An issue was discovered in the Multipart Request Parser in Django 3.2 before 3.2.18, 4.0… CVSS 3.1HIGH 7.5
- TI-2019-14306 Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. CVSS 3.1CRITICAL 9.8
- TI-2019-10595 An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x… CVSS 3.0CRITICAL 9.8
- TI-2021-14006 Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection… CVSS 3.1CRITICAL 9.8
- TI-2025-35707 SQL injection in djangoproject Django CVSS 3.1HIGH 8.1
Sources
- CVE-2020-7471 · CVE Program
- CVE-2020-7471 · NVD
- FIRST EPSS
- GHSA-hmr4-m2h5-33qx · GitHub Advisory Database · CC BY 4.0
- CVE-2020-7471 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences