Vulnerability · Published Feb 3, 2020 · Assigned by mitre
CVE-2020-7471
Critical 9.8
In plain English
A critical-severity security flaw in the py3-django package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 65.6% (higher than 99.3% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-django | 1.11.28-r0 | ALPINE-CVE-2020-7471 |
| Alpine:v3.21 | py3-django | 1.11.28-r0 | ALPINE-CVE-2020-7471 |
| Alpine:v3.22 | py3-django | 1.11.28-r0 | ALPINE-CVE-2020-7471 |
| Alpine:v3.23 | py3-django | 1.11.28-r0 | ALPINE-CVE-2020-7471 |
| Alpine:v3.24 | py3-django | 1.11.28-r0 | ALPINE-CVE-2020-7471 |
| Debian:12 | python-django | 2:2.2.10-1 | DEBIAN-CVE-2020-7471 |
| Debian:13 | python-django | 2:2.2.10-1 | DEBIAN-CVE-2020-7471 |
| Debian:14 | python-django | 2:2.2.10-1 | DEBIAN-CVE-2020-7471 |
| PyPI | django | 1.11.28, 2.2.10, 3.0.3 | PYSEC-2020-35 |
| PyPI | django | 3.0.3 | GHSA-hmr4-m2h5-33qx |
| PyPI | django | 2.2.10 | GHSA-hmr4-m2h5-33qx |
| PyPI | django | 1.11.28 | GHSA-hmr4-m2h5-33qx |
Affected products (as reported)
References
- https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI x_refsource_CONFIRM
- https://docs.djangoproject.com/en/3.0/releases/security/ x_refsource_CONFIRM
- https://www.openwall.com/lists/oss-security/2020/02/03/1 x_refsource_CONFIRM
- https://www.djangoproject.com/weblog/2020/feb/03/security-releases/ x_refsource_CONFIRM
- [oss-security] 20200203 Django 3.0.3, 2.2.10 and 1.11.28: CVE-2020-7471: Potential SQL injection via ``StringAgg(delimiter)`` mailing-list, x_refsource_MLIST
- https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136 x_refsource_CONFIRM
- USN-4264-1 vendor-advisory, x_refsource_UBUNTU
- 20200219 [SECURITY] [DSA 4629-1] python-django security update mailing-list, x_refsource_BUGTRAQ
- DSA-4629 vendor-advisory, x_refsource_DEBIAN
- https://security.netapp.com/advisory/ntap-20200221-0006/ x_refsource_CONFIRM
- GLSA-202004-17 vendor-advisory, x_refsource_GENTOO
- FEDORA-2020-c2639662af vendor-advisory, x_refsource_FEDORA