CVE-2020-9402
SQL injection in Django
Reported by mitre · Published March 5, 2020
django is fixed in 3.0.4, 2.2.11 and 1.11.29 (PyPI)
Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a tolerance parameter in GIS functions and aggregates on Oracle. By passing a suitably crafted tolerance to GIS functions and aggregates on Oracle, it was possible to break escaping and inject malicious SQL.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| django | PyPI | 3.0.4, 2.2.11, 1.11.29 |
| django | Bitnami | 3.0.4, 2.2.11, 1.11.29 |
| django | djangoproject | 3.0.4, 2.2.11, 1.11.29 |
| django | Bitnami | 3.0.4, 2.2.11, 1.11.29 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| PyPI | Django | 1.11.0, 3.0.0, 2.2.0 |
| n/a | n/a | * |
| alpine | py3-django | 0 |
| arch | python-django | 0 |
| alpine | py-django | 0 |
Timeline
- Mar 4, 2020 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Sep 8, 2025 CVE Updated
- Mar 7, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 7, 2026 Security Advisory (4 in total, the first dated here)
- Aug 28, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2020-9402
vulnetix vdb fixes CVE-2020-9402
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2020-9402/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_CONFIRM
- USN-4296-1 vendor-advisoryx_refsource_UBUNTU
- x_refsource_CONFIRM
- GLSA-202004-17 vendor-advisoryx_refsource_GENTOO
- DSA-4705 vendor-advisoryx_refsource_DEBIAN
- FEDORA-2020-c2639662af vendor-advisoryx_refsource_FEDORA
- FEDORA-2020-2e7d30f7aa vendor-advisoryx_refsource_FEDORA
- [debian-lts-announce] 20220526 [SECURITY] [DLA 3024-1] python-django security update mailing-listx_refsource_MLIST
- https://nvd.nist.gov/vuln/detail/CVE-2020-9402 advisory
- https://github.com/advisories/GHSA-3gh2-xw74-jmcw advisory
- https://groups.google.com/forum/#!topic/django-announce/fLUh_pOaKrY url
- https://github.com/django/django/commit/6695d29b1c1ce979725816295a26ecc64ae0e927 patch
- https://docs.djangoproject.com/en/3.0/releases/security url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UZMN2NKAGTFE3YKMNM2JVJG7R2W7LLHY url
- https://security.netapp.com/advisory/ntap-20200327-0004 advisory
- https://usn.ubuntu.com/4296-1 url
- https://www.djangoproject.com/weblog/2020/mar/04/security-releases url
…and 5 more