Description
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.
Published: 2026-02-03
Score: 5.4 Medium
EPSS: 9.4% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

This issue involves a classic SQL injection vulnerability (CWE-89) that is triggered when performing raster lookups on Django's RasterField using PostGIS. The band index parameter is not properly sanitized, allowing an attacker to inject arbitrary SQL statements via the query path. If exploited, the attacker could read, modify, or delete database data, potentially compromising information confidentiality and integrity.

Affected Systems

The Django applies to releases before 6.0.2 in the 6.0 series, before 5.2.11 in the 5.2 series, and before 4.2.28 in the 4.2 series; unsupported older series such as 5.0.x, 4.1.x, and formally evaluated but may share the same code and require patching.

Risk and Exploitability

The CVSS score of 5.4 indicates a medium severity, and the EPSS score of 9% indicates a moderate likelihood of exploitation. The attack vector is remote and requires the ability to send crafted requests to Django applications that use PostGIS raster lookups. Because the vulnerability is not listed in the CISA evidence of widespread exploitation yet, but the potential impact justifies swift action.

Generated by OpenCVE AI on June 30, 2026 at 15:45 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest Django release that contains the fix (≥6.0.2, ≥5.2.11, or ≥4.2.28).
  • If an upgrade cannot be performed immediately, remove or restrict access to RasterField lookups that rely on PostGIS in the application code until the patch is applied.
  • Review the application’s database permissions to limit the database user’s ability to execute non‑SELECT statements, thereby reducing the damage potential of any injected query.

Generated by OpenCVE AI on June 30, 2026 at 15:45 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4484-1 python-django security update
Debian DSA Debian DSA DSA-6150-1 python-django security update
Github GHSA Github GHSA GHSA-mwm9-4648-f68q Django has an SQL Injection issue
Ubuntu USN Ubuntu USN USN-8009-1 Django vulnerabilities
History

Wed, 04 Feb 2026 17:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*

Wed, 04 Feb 2026 12:15:00 +0000

Type Values Removed Values Added
First Time appeared Djangoproject
Djangoproject django
Vendors & Products Djangoproject
Djangoproject django

Wed, 04 Feb 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Tue, 03 Feb 2026 17:15:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 03 Feb 2026 15:00:00 +0000

Type Values Removed Values Added
Description 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.
Title Potential SQL injection via raster lookups on PostGIS
Weaknesses CWE-89
References

Subscriptions

Djangoproject Django
cve-icon MITRE

Status: PUBLISHED

Assigner: DSF

Published:

Updated: 2026-06-30T03:16:49.196Z

Reserved: 2026-01-19T20:14:06.262Z

Link: CVE-2026-1207

cve-icon Vulnrichment

Updated: 2026-06-30T02:42:39.084Z

cve-icon NVD

Status : Analyzed

Published: 2026-02-03T15:16:13.433

Modified: 2026-06-17T10:15:19.750

Link: CVE-2026-1207

cve-icon Redhat

Severity : Important

Publid Date: 2026-02-03T14:35:33Z

Links: CVE-2026-1207 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-06-30T16:00:15Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')