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: 5.3% Low
KEV: No
Impact: SQL Injection
Action: Upgrade
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 web framework is affected. The vulnerability 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 3.2.x were not 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 4% suggests a modest 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 KEV catalog, there is no evidence of widespread exploitation yet, but the potential impact justifies swift action.

Generated by OpenCVE AI on April 18, 2026 at 00:22 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 April 18, 2026 at 00:22 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-02-03T16:21:08.811Z

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

Link: CVE-2026-1207

cve-icon Vulnrichment

Updated: 2026-02-03T16:21:02.721Z

cve-icon NVD

Status : Analyzed

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

Modified: 2026-02-04T17:34:46.147

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-04-18T00:30:25Z

Weaknesses