CVE-2026-1207: Django SQL injection in RasterField lookups on PostGIS

CVE-2026-1207 · Severity: high · CVSS 5.4 · Published 2026-02-03

A vulnerability was found in the Django web framework specifically affecting applications using PostGIS for geographic data. An attacker could potentially execute unauthorized database commands, which could lead to the theft or modification of sensitive information. This issue is resolved in the latest security updates for supported Django versions.

Technologies: Django (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-1207 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-1207 being exploited in the wild.
How severe is CVE-2026-1207?
High severity, with a CVSS score of 5.4, published 3 February 2026.
Which products and versions are affected?
Django (PyPI) ECOSYSTEM:introduced=4.2,fixed=4.2.28,introduced=5.2,fixed=5.2.11,introduced=6.0,fixed=6.0.2, ECOSYSTEM:introduced=6.0a1,fixed=6.0.2.
Is there a fix for CVE-2026-1207?
Yes. Django (PyPI): upgrade to 6.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-1207 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-1207?
Check whether you run Django (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Django (PyPI): upgrade to 6.0.2 or later
    pip install "Django>=6.0.2"

Technical details

A SQL injection vulnerability exists in Django's GIS module specifically during raster lookups on 'RasterField'. The flaw is located in the band index parameter, which is only implemented on the PostGIS backend. A remote attacker with the ability to influence these lookups can inject malicious SQL commands. The issue affects Django versions 6.0.x, 5.2.x, and 4.2.x; older unsupported versions like 5.0.x and 3.2.x may also be vulnerable. Patches are available in versions 6.0.2, 5.2.11, and 4.2.28.

Affected products

  • Django Software Foundation Django 6.0 before 6.0.2, 5.2 before 5.2.11, 4.2 before 4.2.28

Identifiers

  • CVE-2026-1207
  • GHSA-mwm9-4648-f68q
  • PYSEC-2026-44

Timeline

  • 2026-02-03: disclosed
  • 2026-02-03: patched
  • 2026-02-03: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.