SQL injection in Django
Published 5 Jun 2020 · Updated 9 Jul 2026
Is your project on an affected django?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=1.11 <1.11.29
- Fixed in
- 1.11.29
pip install 'django>=1.11.29'- Affected
- >=2.2 <2.2.11
- Fixed in
- 2.2.11
pip install 'django>=2.2.11'- Affected
- >=3.0 <3.0.4
- Fixed in
- 3.0.4
pip install 'django>=3.0.4'Details
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.
Is GHSA-3gh2-xw74-jmcw in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected django, and gives you the command that fixes it.
More advisories for django
- HighCVE-2026-15307Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing · 4 Aug 2026
- MediumCVE-2026-15830Django GeoDjango vulnerable to denial of service through deeply nested geometry collections · 4 Aug 2026
- MediumCVE-2026-53878Django: DomainNameValidator permits newline characters that may enable HTTP header injection · 7 Jul 2026
- MediumCVE-2026-53877 Django: GDALRaster may over-read heap memory when constructed from bytes · 7 Jul 2026
- LowCVE-2026-48588Django: cache middleware may expose private responses when unrelated request cookies are present · 7 Jul 2026
- LowCVE-2026-8404Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling · 3 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2020-9402
- Linkgithub.com/django/django/commit/6695d29b1c1ce979725816295a26ecc64ae0e927
- Linkwww.djangoproject.com/weblog/2020/mar/04/security-releases
- Linkwww.debian.org/security/2020/dsa-4705
- Linkusn.ubuntu.com/4296-1
- Linksecurity.netapp.com/advisory/ntap-20200327-0004
- Linksecurity.gentoo.org/glsa/202004-17
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UZMN2NKAGTFE3YKMNM2JVJG7R2W7LLHY
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UZMN2NKAGTFE3YKMNM2JVJG7R2W7LLHY
- Linklists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4A2AP4T7RKPBCLTI2NNQG3T6MINDUUMZ
- Linklists.debian.org/debian-lts-announce/2022/05/msg00035.html
- Linkgroups.google.com/forum/#%21topic/django-announce/fLUh_pOaKrY
- Linkgroups.google.com/forum/#!topic/django-announce/fLUh_pOaKrY
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-36.yaml
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2020-345.yaml
- Packagegithub.com/django/django
- Advisorygithub.com/advisories/GHSA-3gh2-xw74-jmcw
- Linkdocs.djangoproject.com/en/3.0/releases/security
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.