{"id":"CVE-2020-7471","published":"2020-02-03T11:59:20Z","modified":"2024-08-04T09:33:19Z","title":"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…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"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.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:18:41Z"},"cvss":null,"epss":{"score":0.65575,"percentile":0.99279,"date":"2026-11-19","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-11-19","exploitedFirstSeen":null,"ransomware":false,"evidence":[],"evidenceTotal":0,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[],"references":[{"url":"https://groups.google.com/forum/#%21topic/django-announce/X45S86X5bZI","tags":["x_refsource_CONFIRM"]},{"url":"https://docs.djangoproject.com/en/3.0/releases/security/","tags":["x_refsource_CONFIRM"]},{"url":"https://www.openwall.com/lists/oss-security/2020/02/03/1","tags":["x_refsource_CONFIRM"]},{"url":"https://www.djangoproject.com/weblog/2020/feb/03/security-releases/","tags":["x_refsource_CONFIRM"]},{"url":"http://www.openwall.com/lists/oss-security/2020/02/03/1","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://github.com/django/django/commit/eb31d845323618d688ad429479c6dda973056136","tags":["x_refsource_CONFIRM"]},{"url":"https://usn.ubuntu.com/4264-1/","tags":["vendor-advisory","x_refsource_UBUNTU"]},{"url":"https://seclists.org/bugtraq/2020/Feb/30","tags":["mailing-list","x_refsource_BUGTRAQ"]},{"url":"https://www.debian.org/security/2020/dsa-4629","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://security.netapp.com/advisory/ntap-20200221-0006/","tags":["x_refsource_CONFIRM"]},{"url":"https://security.gentoo.org/glsa/202004-17","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"PyPI","package":"Django","vulnerableRanges":["<1.11.28",">=2.0, <2.2.10",">=3.0, <3.0.3",">=1.11, <1.11.28",">=2.2, <2.2.10"],"patched":["1.11.28","2.2.10","3.0.3"],"from":["GHSA-hmr4-m2h5-33qx","PYSEC-2020-35"],"provenance":"source"}],"advisories":[{"id":"GHSA-hmr4-m2h5-33qx","url":"https://github.com/advisories/GHSA-hmr4-m2h5-33qx","severity":"CRITICAL","ecosystem":"PyPI","package":"Django","vulnerableRanges":["<1.11.28"],"patched":["1.11.28"],"provenance":"source","from":"GHSA"},{"id":"GHSA-hmr4-m2h5-33qx","url":"https://github.com/advisories/GHSA-hmr4-m2h5-33qx","severity":"CRITICAL","ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=2.0, <2.2.10"],"patched":["2.2.10"],"provenance":"source","from":"GHSA"},{"id":"GHSA-hmr4-m2h5-33qx","url":"https://github.com/advisories/GHSA-hmr4-m2h5-33qx","severity":"CRITICAL","ecosystem":"PyPI","package":"Django","vulnerableRanges":[">=3.0, <3.0.3"],"patched":["3.0.3"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2020-0071","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2020-0071","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":5,"skipped":2,"earliest":"2020-02-11","earliestUrl":"https://github.com/Saferman/CVE-2020-7471","repos":[{"name":"Saferman/CVE-2020-7471","url":"https://github.com/Saferman/CVE-2020-7471","stars":103,"created":"2020-02-11"},{"name":"secoba/DjVul_StringAgg","url":"https://github.com/secoba/DjVul_StringAgg","stars":2,"created":"2020-02-13"},{"name":"SNCKER/CVE-2020-7471","url":"https://github.com/SNCKER/CVE-2020-7471","stars":2,"created":"2020-02-22"},{"name":"huzaifakhan771/CVE-2020-7471-Django","url":"https://github.com/huzaifakhan771/CVE-2020-7471-Django","stars":1,"created":"2021-06-03"},{"name":"mrlihd/CVE-2020-7471","url":"https://github.com/mrlihd/CVE-2020-7471","stars":0,"created":"2021-09-01"}]},"first":{"date":"2020-02-11","source":"PoC-in-GitHub","url":"https://github.com/Saferman/CVE-2020-7471"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2020-02-03","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2020-7471","provenance":"source"},{"date":"2020-02-11","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/Saferman/CVE-2020-7471","provenance":"source"}],"speed":{"daysToPublicExploit":8,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":69.9,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":10.0,"detail":"added 1 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.86,"detail":"percentile 0.9928"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"5 PoC-in-GitHub repos"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2019-14235","published":"2019-08-02","fixed":"2.2.4","kev":false},{"cve":"CVE-2019-19118","published":"2019-12-02","fixed":"2.2.8","kev":false},{"cve":"CVE-2019-19844","published":"2019-12-18","fixed":"3.0.1","kev":false,"link":{"from":"CVE-2019-19844","to":"CVE-2020-7471","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"1.11.27","toFixed":"1.11.28","daysApart":47},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"2.2.9","toFixed":"2.2.10","daysApart":47}]}},{"cve":"CVE-2020-7471","published":"2020-02-03","fixed":"3.0.3","kev":false},{"cve":"CVE-2020-9402","published":"2020-03-05","fixed":"3.0.4","kev":false,"link":{"from":"CVE-2020-7471","to":"CVE-2020-9402","relation":"successor","confidence":"medium","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"1.11.28","toFixed":"1.11.29","daysApart":31},{"kind":"version-step","provenance":"source","package":"PyPI:Django","fromFixed":"2.2.10","toFixed":"2.2.11","daysApart":31},{"kind":"similar","provenance":"machine","score":0.31,"basis":"same package + description similarity"}]}},{"cve":"CVE-2020-13254","published":"2020-06-03","fixed":"3.0.7","kev":false},{"cve":"CVE-2020-13596","published":"2020-06-03","fixed":"3.0.7","kev":false}],"package":"PyPI:Django"}}