Patchfirst
CVE-2026-1207 Public exploit Medium · 5.4 EPSS 12.8%

Potential SQL injection via raster lookups on PostGIS

Fix:upgrade Django to 6.0.2 or later Details ↓

djangoproject · Django

Summary

The flaw is a SQL injection issue in Django's raster lookups on RasterField, which is only implemented on PostGIS, where the band index parameter is not properly neutralised before being used in a SQL command. An attacker who can send requests to an application using these lookups, with low privileges and no user interaction needed, can inject SQL through the band index parameter to affect confidentiality and integrity.

Official description · CVE.org

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.

Breakdown
71.1 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 23 days after disclosure. Public exploit code (PoC-in-GitHub) appeared 3 months after disclosure.

  1. Disclosedday 0
  2. First seen exploitedVulnCheck KEV evidence+23 days
  3. Public exploit codePoC-in-GitHub+3 mo

Affected versions and fixes

as published in the CVE record

djangoproject Django

Affected: >= 6.0, < 6.0.2 · >= 5.2, < 5.2.11 · >= 4.2, < 4.2.28

Not affected: 6.0.2 · 5.2.11 · 4.2.28

Attack pattern (CAPEC)

CAPEC-66 SQL Injection

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: Django.

Upgrade to 6.0.2 or later

pippip install "Django>=6.0.2"

The first fix for CVE-2026-1207.

Affected versions, by release line

If you runUpgrade to
6.0a1 up to 6.0.26.0.2
5.2a1 up to 5.2.115.2.11
4.2a1 up to 4.2.284.2.28

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 31 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

15 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close