cbcvebase.
CVE-2020-7471
published 2020-02-03

CVE-2020-7471: 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…

PriorityP274critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EPSS
65.34%
99.2th percentile
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

7 ranges
VendorProductVersion rangeFixed in
debianpython-django< python-django 2:2.2.10-1 (bookworm)python-django 2:2.2.10-1 (bookworm)
djangoprojectdjango>= 0 < 1.11.281.11.28
djangoprojectdjango>= 1.11 < 1.11.281.11.28
djangoprojectdjango>= 2.0 < 2.2.102.2.10
djangoprojectdjango>= 2.2 < 2.2.102.2.10
djangoprojectdjango>= 3.0 < 3.0.33.0.3
djangoprojectdjango>= 3.0 < 3.0.33.0.3

Detection & IOCsextracted from sources · hover to see the quote

  • SQL injection vector is the `delimiter` parameter of `contrib.postgres.aggregates.StringAgg`; monitor or WAF-inspect application inputs that flow into this aggregation function for crafted delimiter values designed to break escaping.
  • Exploitation requires a PostgreSQL backend; applications using other databases (e.g., MongoDB) are not affected — scope detection efforts to Django deployments backed by PostgreSQL.
  • Potential impact includes denial of service, information disclosure, and privilege escalation via the injected SQL payload — correlate PostgreSQL query logs for anomalous StringAgg delimiter content.
  • ·Vulnerability only applies when untrusted/user-supplied data is passed as the StringAgg delimiter; applications that do not expose this parameter to user input are not exploitable.
  • ·Red Hat products using MongoDB instead of PostgreSQL are not affected despite containing the vulnerable Django code.
  • ·Satellite 6 includes the vulnerable Django version but does not use the StringAgg delimiter implementation, so it is not directly exposed.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
osv9.8CRITICAL
vendor_debian9.8CRITICAL
vendor_redhat9.8CRITICAL
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.