Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-1207: SQL injection in Django PostGIS RasterField band index

Published Feb 3, 2026 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.3High · v3.1
EPSS12.8%96th percentile
CISA KEVNoNot listed
In the wildReported109 exploitation records in Mallory
Vendor
Djangoproject
IdentifiersCVE-2026-1207CWE-89 · Improper Neutralization of Special…

CVE-2026-1207 is a SQL injection vulnerability in Django's GeoDjango raster lookups on RasterField, implemented only for the PostGIS backend. Improper handling of untrusted data used as the band index allows remote attackers to inject SQL commands. Affected releases include Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. Unsupported series, including 5.0.x, 4.1.x, and 3.2.x, were not evaluated and may also be affected.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows injection of SQL into application database queries, potentially exposing sensitive user data, modifying database contents, or bypassing application authentication. These outcomes depend on the application query context and database permissions. Exploitation attempts have been observed in the wild.

Mitigation

If you can’t patch tonight, do this now.

Until patched, avoid the affected PostGIS raster lookup functionality or prevent untrusted data from reaching the band index parameter. Restrict access to exposed application endpoints and apply least-privilege database controls. Monitor application logs for unusual band parameters and unexpected database errors. Disable Django debug mode in production to reduce diagnostic information leakage; this does not fix the SQL injection.

Remediation

Patch, then assume compromise.

Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Move unsupported upstream releases to a supported, patched release or install the applicable distribution-maintained security update. Debian fixes are available in python-django 3:3.2.25-0+deb12u2 for bookworm and 3:4.2.28-0+deb13u1 for trixie. For bundled Django deployments, apply the relevant product security updates.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
CVE-2026-1207This repository is a runnable proof-of-concept environment for CVE-2026-1207, demonstrating a SQL injection flaw in Django GIS RasterField query handling. It is not an exploit framework module; it is a standalone Django project built to reproduce the issue locally. Repository structure: the root contains a standard Django project with manage.py, a project package web/, and a vulnerable app vuln/. The vuln app defines RasterModel and RasterRelatedModel in vuln/models.py using django.contrib.gis.db.models.RasterField and PointField. The vulnerable HTTP route is exposed through web/urls.py -> vuln/urls.py as /book/search. The core vulnerable logic is in vuln/views.py, where Books.get() reads the attacker-controlled GET parameter band and passes it directly into RasterModel.objects.filter(rast__contains=(rast, band)). A GDALRaster object is constructed inline to satisfy the lookup. The query is printed and executed with qs.count(), making the injection observable. Exploit capability: the code enables web-based SQL injection against the backend PostgreSQL/PostGIS database through the band parameter. The README and inline comment provide a time-based blind payload using pg_sleep(3): 1);select '1'||pg_sleep(3) --. This confirms that arbitrary SQL fragments can be injected into the generated GIS SQL. The exploit does not include post-exploitation automation, credential dumping, or shell payloads; it is focused on proving injection. Environment and targeting: the devcontainer setup provisions Python 3.11, Django 5.2.9, psycopg2-binary, GDAL/GEOS/PROJ libraries, and a PostGIS container with postgis and postgis_raster extensions enabled. The web service is exposed on port 8087 and the database service is reachable as db:5432. The README explicitly states the issue affects django.contrib.gis RasterField and demonstrates exploitation via http://localhost:8087/book/search. Assessment: this is a real exploit POC rather than a scanner or detection-only script. Its maturity is POC because it demonstrates exploitation with a hardcoded payload example but does not provide a generalized exploitation toolkit or customizable weaponized payload handling.sw0rd1ight · Disclosed Apr 26, 2026 · python · markdown · web · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
DjangoprojectDjangoapplication
FAQ

Frequently asked questions

Is CVE-2026-1207 exploited in the wild?
Yes. As of Oct 9, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2026-1207?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-1207, the earliest disclosed Apr 26, 2026.
Is there a patch for CVE-2026-1207?
Upgrade to Django 6.0.2 or later in the 6.0 series, 5.2.11 or later in the 5.2 series, or 4.2.28 or later in the 4.2 series. Move unsupported upstream releases to a supported, patched release or install the applicable distribution-maintained security update.
What products are affected by CVE-2026-1207?
Djangoproject Django.
How severe is CVE-2026-1207?
CVE-2026-1207 has a CVSS v3.1 score of 8.3 (High) and an EPSS score of 12.8% (96th percentile) as of Oct 9, 2026.
Activity feed

Recent activity

46 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+8 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity33Community discussion across Reddit, Mastodon, and other social sources.