CVE-2026-1207: SQL injection in Django PostGIS RasterField band index
- Vendor
- Djangoproject
CVE-2026-1207 is a SQL injection vulnerability in Django's GeoDjango raster lookups on RasterField, implemented only for the PostGIS backend. Improper handling of untrusted data used as the band index allows remote attackers to inject SQL commands. Affected releases include Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. Unsupported series, including 5.0.x, 4.1.x, and 3.2.x, were not evaluated and may also be affected.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows injection of SQL into application database queries, potentially exposing sensitive user data, modifying database contents, or bypassing application authentication. These outcomes depend on the application query context and database permissions. Exploitation attempts have been observed in the wild.
Mitigation
If you can’t patch tonight, do this now.
Until patched, avoid the affected PostGIS raster lookup functionality or prevent untrusted data from reaching the band index parameter. Restrict access to exposed application endpoints and apply least-privilege database controls. Monitor application logs for unusual band parameters and unexpected database errors. Disable Django debug mode in production to reduce diagnostic information leakage; this does not fix the SQL injection.
Remediation
Patch, then assume compromise.
Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Move unsupported upstream releases to a supported, patched release or install the applicable distribution-maintained security update. Debian fixes are available in python-django 3:3.2.25-0+deb12u2 for bookworm and 3:4.2.28-0+deb13u1 for trixie. For bundled Django deployments, apply the relevant product security updates.
Exploits
1 exploit validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-1207 exploited in the wild?
- Yes. As of Oct 9, 2026, Mallory has reports of exploitation in the wild.
- Is there a public exploit for CVE-2026-1207?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-1207, the earliest disclosed Apr 26, 2026.
- Is there a patch for CVE-2026-1207?
- Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Move unsupported upstream releases to a supported, patched release or install the applicable distribution-maintained security update.
- What products are affected by CVE-2026-1207?
- Djangoproject Django.
- How severe is CVE-2026-1207?
- CVE-2026-1207 has a CVSS v3.1 score of 8.3 (High) and an EPSS score of 12.8% (96th percentile) as of Oct 9, 2026.
Recent activity
46 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.