HighGHSA-mwm9-4648-f68qBIT-django-2026-1207CVE-2026-1207PYSEC-2026-44

Django has an SQL Injection issue

Published 3 Feb 2026 · Updated 10 Sept 2026

Is your project on an affected django?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

djangoPyPI
Affected
>=6.0a1 <6.0.2
Fixed in
6.0.2
Update to the fixed version for your release line, for example:pip install 'django>=6.0.2'
djangoPyPI
Affected
>=5.2a1 <5.2.11
Fixed in
5.2.11
Update to the fixed version for your release line, for example:pip install 'django>=5.2.11'
djangoPyPI
Affected
>=4.2a1 <4.2.28
Fixed in
4.2.28
Update to the fixed version for your release line, for example:pip install 'django>=4.2.28'

Details

An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.

Raster lookups on `RasterField` (only implemented on PostGIS) allows remote attackers to inject SQL via the band index parameter. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.

Django would like to thank Tarek Nakkouch for reporting this issue.

Is GHSA-mwm9-4648-f68q 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
All 162 advisories for django

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.