Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: 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 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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2020-7471
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:30 UTC · Revision 1

Source evidence

CVE-2020-7471

core-osv · Original source

Published 3 Feb 2020, 12:15 UTC

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.

osv:CVE-2020-7471
Complete source record
{
  "id": "32271d9760fa61a835bd84b81bb63f30bac2bb94c8bc0610029aa16f25095638",
  "url": "https://osv.dev/vulnerability/CVE-2020-7471",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2020-7471",
    "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.",
    "evidence": "osv:CVE-2020-7471",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2020-7471",
      "aliases": [
        "BIT-django-2020-7471",
        "CVE-2020-7471",
        "GHSA-hmr4-m2h5-33qx",
        "PYSEC-2020-35"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c669cf279ae7b3e02a61db4fb077030a4db80e4f"
                },
                {
                  "fixed": "e09f09b965ef47ffd99abd2c26ba7416751cffa6"
                },
                {
                  "introduced": "2a62cdcfec85938f40abb2e9e6a9ff497e02afe8"
                },
                {
                  "fixed": "b2c33a57b3b98f1e90bbc2a2be2c5a6d814eed29"
                },
                {
                  "introduced": "2a04e24d2dfc8e60a66e4369d970913cb2112d91"
                },
                {
                  "fixed": "c459a4661b2e96b53d3784c76e1fd5651b8cdc4a"
                },
                {
                  "fixed": "eb31d845323618d688ad429479c6dda973056136"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.11"
                      },
                      {
                        "fixed": "1.11.28"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.2"
                      },
                      {
                        "fixed": "2.2.10"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "3.0"
                      },
                      {
                        "fixed": "3.0.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "eb31d845323618d688ad429479c6dda973056136"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-7471.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:23.672882195Z",
      "provider": "osv",
      "references": [
        "https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI",
        "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ/",
        "https://seclists.org/bugtraq/2020/Feb/30",
        "https://usn.ubuntu.com/4264-1/",
        "https://docs.djangoproject.com/en/3.0/releases/security/",
        "https://security.gentoo.org/glsa/202004-17",
        "https://security.netapp.com/advisory/ntap-20200221-0006/",
        "https://www.debian.org/security/2020/dsa-4629",
        "https://www.djangoproject.com/weblog/2020/feb/03/security-releases/",
        "https://www.openwall.com/lists/oss-security/2020/02/03/1",
        "https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2020-7471",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385273,
  "published_at": "2020-02-03T12:15:26.993+00:00"
}