CVE-2020-7471: SQL Injection

Published Feb 3, 2020
·
Updated

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 Software

8 affected componentsFixes available
debian/python-django<=1:1.11.27-1~deb10u1, <=2:2.2.9-2
2:2.2.10-11:1.11.28-1~deb10u11:1.10.7-2+deb9u8
pip/Django>=3.0<3.0.3
3.0.3
pip/Django>=2.0<2.2.10
2.2.10
pip/django<1.11.28
1.11.28
debian/python-django
2:2.2.28-1~deb11u23:3.2.19-1+deb12u13:4.2.16-1
djangoproject Django>=1.11<1.11.28
djangoproject Django>=2.2<2.2.10
djangoproject Django>=3.0<3.0.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/python-django to a version that resolves this vulnerability.

    Fixed in 2:2.2.10-1Fixed in 1:1.11.28-1~deb10u1Fixed in 1:1.10.7-2+deb9u8
  2. Upgrade

    Upgrade pip/Django to a version that resolves this vulnerability.

    Fixed in 3.0.3
  3. Upgrade

    Upgrade pip/Django to a version that resolves this vulnerability.

    Fixed in 2.2.10
  4. Upgrade

    Upgrade pip/django to a version that resolves this vulnerability.

    Fixed in 1.11.28
  5. Upgrade

    Upgrade debian/python-django to a version that resolves this vulnerability.

    Fixed in 2:2.2.28-1~deb11u2Fixed in 3:3.2.19-1+deb12u1Fixed in 3:4.2.16-1
  6. Upgrade

    Upgrade Django StringAgg (contrib.postgres.aggregates.StringAgg) to a version that resolves this vulnerability.

    Fixed in 1.11.28
  7. Upgrade

    Upgrade Django StringAgg (contrib.postgres.aggregates.StringAgg) to a version that resolves this vulnerability.

    Fixed in 2.2.10
  8. Upgrade

    Upgrade Django StringAgg (contrib.postgres.aggregates.StringAgg) to a version that resolves this vulnerability.

    Fixed in 3.0.3

Event History

Feb 3, 2020
CVE Published
via MITRE·11:59 AM
Data Sourced
via MITRE·11:59 AM
Description
Data Sourced
via NVD·12:15 PM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 11, 2020
Advisory Published
via GitHub·09:03 PM
Jan 11, 2024
Data Sourced
via Launchpad·11:52 PM
Description
Sep 20, 2024
Data Sourced
via Ubuntu·03:21 PM
RemedyDescriptionSeverityAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2020-7471?

The severity of CVE-2020-7471 is critical with a CVSS score of 9.8.

2

How does CVE-2020-7471 affect Django versions?

CVE-2020-7471 affects Django versions 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3.

3

What is the vulnerability in CVE-2020-7471?

The vulnerability in CVE-2020-7471 is SQL Injection if untrusted data is used as a StringAgg delimiter.

4

How can I fix CVE-2020-7471?

To fix CVE-2020-7471, update Django to version 3.0.3, 2.2.10, or 1.11.28 depending on the version you are using.

5

Where can I find more information about CVE-2020-7471?

You can find more information about CVE-2020-7471 in the following references: [NVD](https://nvd.nist.gov/vuln/detail/CVE-2020-7471), [GitHub](https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136), [Google Groups](https://groups.google.com/forum/#!topic/django-announce/X45S86X5bZI).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203