CVE-2026-1207: Potential SQL injection via raster lookups on PostGIS
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.
Security readout for executives and security teams
Plain-English summary
CVE-2026-1207 is a high-severity SQL injection issue in Django’s PostGIS raster lookup support. If an application exposes affected RasterField lookups to remote input, an attacker may influence database queries through the band index parameter, risking limited data exposure, modification, or service impact.
Executive priority
Treat this as urgent for geospatial Django services using PostGIS raster data. It is not necessarily broad across all Django applications, but exposed affected lookups create direct database risk. Patch supported branches promptly and identify unsupported deployments for migration.
Technical view
Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28 are affected. The flaw is CWE-89 in RasterField raster lookups, implemented only on PostGIS. The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L, score 8.3.
Likely exposure
Exposure is likely limited to Django applications using GIS RasterField with PostGIS and code paths where raster lookup band index values can be influenced by users or external requests. Unsupported Django branches were not evaluated and may also be affected.
Exploitation context
The source bundle does not show KEV listing or confirmed active exploitation. The issue is remotely reachable, low-complexity, and requires no privileges or user interaction when vulnerable lookup paths are exposed.
Researcher notes
Focus triage on RasterField lookup usage and externally controlled band index values. Earlier unsupported Django branches, including examples named in the source, were not evaluated. Do not assume they are safe without vendor confirmation or code-level assessment.
Mitigation direction
Upgrade Django 6.0.x to 6.0.2 or later.
Upgrade Django 5.2.x to 5.2.11 or later.
Upgrade Django 4.2.x to 4.2.28 or later.
Review unsupported Django series and prioritize migration to supported releases.
Check Django and distribution vendor advisories for package-specific guidance.
Validation and detection
Inventory Django versions across applications and containers.
Identify applications using django.contrib.gis with PostGIS RasterField.
Review request paths that feed external values into raster lookups.
Confirm deployed packages include the fixed Django release.
Check Red Hat advisories if using vendor-packaged Django.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-89: Database access and collection lookup
Injection into data stores can inform collection, data access, and exfiltration detection reviews. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references database injection or access, so collection and exfiltration review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-89 · source CWE mapping
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.