cve.bz

CVE-2026-1207 djangoproject django: SQL Injection

5.4 mediumEPSS 13%Fix available

Medium (5.4) in djangoproject django. EPSS 13% estimated probability of exploitation activity in the next 30 days. Fixed in django 4.2.28, 5.2.11, 6.0.2.

On this page
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.

Severity

CVSS 3.1

5.4 medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
EPSS
13% (unchanged from 13% a week ago; 13% 30 days ago) estimated probability of exploitation activity in the next 30 days; 96th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-02-03. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-1207 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-1207?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-1207?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-1207 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
djangoproject Djangofrom 6.0 before 6.0.2
djangoproject Djangofrom 5.2 before 5.2.11
djangoproject Djangofrom 4.2 before 4.2.28

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-mwm9-4648-f68qPyPIdjango>=6.0a1 <6.0.26.0.2
GHSA-mwm9-4648-f68qPyPIdjango>=5.2a1 <5.2.115.2.11
GHSA-mwm9-4648-f68qPyPIdjango>=4.2a1 <4.2.284.2.28
PYSEC-2026-44PyPIdjango>=4.2 <4.2.28
>=5.2 <5.2.11
>=6.0 <6.0.2
4.2.28, 5.2.11, 6.0.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11python-django2:2.2.28-1~deb11u12DLA-4484-1
Debian12python-django3:3.2.25-0+deb12u2DEBIAN-CVE-2026-1207 DSA-6150-1
Debian13python-django3:4.2.28-0+deb13u1DEBIAN-CVE-2026-1207 DSA-6150-1
Debian14python-django3:4.2.28-1DEBIAN-CVE-2026-1207
Ubuntu22.04:LTSpython-django2:3.2.12-2ubuntu1.25UBUNTU-CVE-2026-1207
Ubuntu24.04:LTSpython-django3:4.2.11-1ubuntu1.14UBUNTU-CVE-2026-1207
Ubuntu25.10python-django3:5.2.4-1ubuntu2.3UBUNTU-CVE-2026-1207
UbuntuPro:18.04:LTSpython-django1:1.11.11-1ubuntu1.21+esm14UBUNTU-CVE-2026-1207
UbuntuPro:20.04:LTSpython-django2:2.2.12-1ubuntu0.29+esm7UBUNTU-CVE-2026-1207
Red Hatansible_automation_platform:2.5::el8automation-controller, automation-controller-ui, automation-controller-cli and 2 more0:4.6.26-1.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el8automation-gateway, automation-gateway-config, automation-gateway-server0:2.5.20260225-1.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el8python3.12-aiohttp, python3.12-aiohttp-debuginfo, python3.12-aiohttp-debugsource0:3.13.3-2.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el8python3.12-protobuf, python3.12-protobuf-debuginfo, python3.12-protobuf-debugsource0:5.29.6-1.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el8receptor, receptorctl, receptor-debuginfo and 1 more0:1.6.3-4.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8python3.12-django0:4.2.28-1.el8apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9automation-controller, automation-controller-ui, automation-controller-cli and 2 more0:4.6.26-1.el9apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9automation-gateway, automation-gateway-config, automation-gateway-server0:2.5.20260225-1.el9apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9python3.12-aiohttp, python3.12-aiohttp-debuginfo, python3.12-aiohttp-debugsource0:3.13.3-2.el9apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9python3.12-protobuf, python3.12-protobuf-debuginfo, python3.12-protobuf-debugsource0:5.29.6-1.el9apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9receptor, receptorctl, receptor-debuginfo and 1 more0:1.6.3-4.el9apRHSA-2026:3959
Red Hatansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9python3.12-django0:4.2.28-1.el9apRHSA-2026:3959
52 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise Module for Package Hub 15 SP7python-Django4.2.11-150600.3.47.1SUSE-SU-2026:0440-1
openSUSELeap 15.6python-Django4.2.11-150600.3.47.1SUSE-SU-2026:0440-1
openSUSELeap 16.0python-Django5.2.4-bp160.5.1openSUSE-SU-2026:20184-1
openSUSETumbleweedpython-Django5.2.11-1.1openSUSE-SU-2026:10160-1
openSUSETumbleweedpython-Django44.2.28-1.1openSUSE-SU-2026:10247-1
openSUSETumbleweedpython-Django55.2.16-1.1openSUSE-SU-2026:11270-1
openSUSETumbleweedpython-Django66.0.2-1.1openSUSE-SU-2026:10145-1
Alpinev3.23, v3.24py3-django4.2.28-r0ALPINE-CVE-2026-1207

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This IMPORTANT flaw affects Django's `RasterField` when utilized with PostGIS, allowing remote SQL injection via the band index parameter. Red Hat Ansible Automation Platform, Red Hat Discovery, Red Hat Satellite, Insights, and Ansible Services are impacted if configured to use Django with PostGIS `RasterField` lookups. Successful exploitation could lead to unauthorized data access, modification, or denial of service.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Ansible Automation Platform 2.5 for RHEL 8python3.12-django-0:4.2.28-1.el8apFixed 2026-03-06RHSA-2026:3959
Red Hat Ansible Automation Platform 2.5 for RHEL 9python3.12-django-0:4.2.28-1.el9apFixed 2026-03-06RHSA-2026:3959
Red Hat Ansible Automation Platform 2.6 for RHEL 9python3.12-django-0:4.2.28-1.el9apFixed 2026-03-06RHSA-2026:3958
Red Hat Satellite 6.16 for RHEL 8python-django-0:4.2.28-0.1.el8pcFixed 2026-03-26RHSA-2026:5971
Red Hat Satellite 6.16 for RHEL 9python-django-0:4.2.28-0.1.el9pcFixed 2026-03-26RHSA-2026:5971
Red Hat Satellite 6.17 for RHEL 9foreman-0:3.14.0.14-1.el9satFixed 2026-03-26RHSA-2026:5970
Red Hat Satellite 6.17 for RHEL 9libcomps-0:0.1.23-0.3.el9pcFixed 2026-03-26RHSA-2026:5970
Red Hat Satellite 6.17 for RHEL 9python-brotli-0:1.2.0-0.1.el9pcFixed 2026-03-26RHSA-2026:5970
Red Hat Satellite 6.17 for RHEL 9python-django-0:4.2.28-0.1.el9pcFixed 2026-03-26RHSA-2026:5970
Red Hat Satellite 6.17 for RHEL 9python-pulp-container-0:2.22.3-1.el9pcFixed 2026-03-26RHSA-2026:5970
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/de-minimal-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/de-minimal-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-24/lightspeed-rhel8Will not fix
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/de-minimal-rhel8Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-25/de-minimal-rhel9Not affected
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/de-minimal-rhel9Not affected
Red Hat Ansible Automation Platform 2automation-controllerWill not fix
Red Hat Ansible Automation Platform 2python-djangoNot affected
Red Hat OpenStack Platform 16.2python-django20Not affected
Red Hat OpenStack Platform 17.1python-djangoNot affected
15 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-1207.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • sw0rd1ight/CVE-2026-1207 Harbor Check: matches CVE 3 stars, Python, created
    Django 框架在使用 PostGIS 查询地理栅格(raster)数据时,若将未经验证的用户输入直接作为 band index(波段索引)参数,会引发 SQL 注入

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

  • Nuclei template Django RasterField - SQL Injection
  • Emerging Threats Open ET WEB_SPECIFIC_APPS Django SQL Injection via raster lookups on PostGIS (CVE-2026-1207) sid 2067723

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON