# CVE-2026-1207: django — Fixed in 6.0.2

🐍

🐍 PyPI

Not in CISA KEV

MEDIUM severity

# CVE-2026-1207 — django

MEDIUM [Fix: django/django@81aa529](https://github.com/django/django/commit/81aa5292967cd09319c45fe2c1a525ce7b6684d8)

CVE-2026-1207 is a medium-severity (CVSS 5.4) SQL Injection vulnerability in django. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for django — see the affected versions and patch details below.

Potential SQL injection via raster lookups on PostGIS

Also known asBIT-django-2026-1207[GHSA-mwm9-4648-f68q](/vulnerability/GHSA-mwm9-4648-f68q)PYSEC-2026-44

Published

Feb 3, 2026

Updated

Oct 28, 2026

Affected

3 pkgs

Patched

3 / 3

Exploits

1 known

Exploitation data as of Nov 9, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## Exploitation Status

### No confirmed exploitation observed yet

-   CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-1207.

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

12.8%probability of exploitation in next 30 days

Moderate Risk\-0.16%

Lower risk than most CVEs96th percentile — riskier than 96% of all scored CVEsHighest risk

2.99%7.09%11.2%15.3%5.3%9.4%13.0%12.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

3 pkgs affected

🐍`django`🐍`django`🐍`django`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

## 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.

## Affected Packages

3 total 3 fixed

Ecosystem

Package

Vulnerable range

Fix

🐍PyPI

`django` 

≥ 6.0a1&&< 6.0.2

6.0.2`pip install --upgrade 'django==6.0.2'`

🐍PyPI

`django` 

≥ 5.2a1&&< 5.2.11

5.2.11`pip install --upgrade 'django==5.2.11'`

🐍PyPI

`django` 

≥ 4.2a1&&< 4.2.28

4.2.28`pip install --upgrade 'django==4.2.28'`

## Affected Products

1 product · 3 configurations

Application

`django`djangoproject

≥ 6.0 && < 6.0.2

range

Exploits & PoCs

1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

[

sw0rd1ight/CVE-2026-1207

Django 框架在使用 PostGIS 查询地理栅格（raster）数据时，若将未经验证的用户输入直接作为 band index（波段索引）参

⭐ 3🍴 0Aug 2026

](https://github.com/sw0rd1ight/CVE-2026-1207)

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update django to 6.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-1207 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
    

## How to detect CVE-2026-1207

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

`nuclei -id cve-2026-1207 -u https://target`

Template

Django RasterField - SQL Injection

Severity

high

Impact

Remote attackers can execute arbitrary SQL commands, potentially leading to data disclosure or modification.

Remediation

Upgrade to versions 6.0.2, 5.2.11, 4.2.28 or later.

Template by [ProjectDiscovery nuclei-templates](https://github.com/projectdiscovery/nuclei-templates) (omarkurt), MIT licensed. [View the full template](https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-1207.yaml). Scan only systems you are authorised to test.

## Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

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\`…

Workaround published by Red Hat

> 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.

Source: [Red Hat security advisory for CVE-2026-1207](https://access.redhat.com/security/cve/cve-2026-1207) (CC BY 4.0)

Product

Fixed in

Advisory

Red Hat Ansible Automation Platform 2.5 for RHEL 8

`python3.12-django-0:4.2.28-1.el8ap`

[RHSA-2026:3959](https://access.redhat.com/errata/RHSA-2026:3959)

Red Hat Ansible Automation Platform 2.6 for RHEL 9

`python3.12-django-0:4.2.28-1.el9ap`

[RHSA-2026:3958](https://access.redhat.com/errata/RHSA-2026:3958)

Red Hat Satellite 6.16 for RHEL 8

`python-django-0:4.2.28-0.1.el8pc`

[RHSA-2026:5971](https://access.redhat.com/errata/RHSA-2026:5971)

Red Hat Satellite 6.17 for RHEL 9

`foreman-0:3.14.0.14-1.el9sat`

[RHSA-2026:5970](https://access.redhat.com/errata/RHSA-2026:5970)

Red Hat Satellite 6.18 for RHEL 9

`python3.12-django-0:4.2.30-1.el9pc`

[RHSA-2026:14835](https://access.redhat.com/errata/RHSA-2026:14835)

Red Hat Ansible Automation Platform 2.5

`ansible-automation-platform-25/lightspeed-rhel8:1772214630`

[RHSA-2026:3962](https://access.redhat.com/errata/RHSA-2026:3962)

Red Hat Ansible Automation Platform 2.6

`ansible-automation-platform-26/lightspeed-rhel9:1772552788`

[RHSA-2026:3960](https://access.redhat.com/errata/RHSA-2026:3960)

Red Hat Discovery 2

`discovery/discovery-server-rhel9:1770913597`

[RHSA-2026:2694](https://access.redhat.com/errata/RHSA-2026:2694)

## Frequently Asked Questions

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.

O3 Security · Impact-Aware SCA

### Is CVE-2026-1207 in your dependencies?

Find it across PyPI, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)