Patchfirst
CVE-2020-7471 Public exploit EPSS 65.6%

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…

Fix:upgrade Django to 3.0.3 or later also fixes CVE-2019-19844 Details ↓

Summary

The flaw is a SQL injection in Django's contrib.postgres.aggregates.StringAgg component, affecting Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3. An attacker who can supply a crafted delimiter to a StringAgg instance, such as through an application feature that lets users choose a column delimiter for data downloads, can break escaping and inject malicious SQL.

Official description · CVE.org

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.

Breakdown
69.9 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

Public exploit code (PoC-in-GitHub) appeared 8 days after disclosure. No confirmed exploitation is recorded.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+8 days

7 fixes in Django over 10 months. The latest fix listed for Django is 3.0.7.

Fixes in DjangoPyPI package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.2.4CVE-2019-142352 Aug 2019
  2. 2.2.8CVE-2019-191182 Dec 2019
  3. 3.0.1CVE-2019-1984418 Dec 2019
  4. 3.0.3CVE-2020-74713 Feb 2020
  5. 3.0.4CVE-2020-94025 Mar 2020
  6. 3.0.7CVE-2020-132543 Jun 2020
  7. 3.0.7CVE-2020-135963 Jun 2020Latest listed

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: Django.

Upgrade to 3.0.3 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2019-19844).

pippip install "Django>=3.0.3"

The first fix for CVE-2020-7471.

Affected versions, by release line

If you runUpgrade to
3.0 up to 3.0.33.0.3
2.0 up to 2.2.102.2.10
All versions before 1.11.281.11.28

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

11 links, grouped by NVD tag (1 duplicate merged)
↑ ↓ chooseEnter openEsc close