On 2 December 2026, Django patched a SQL injection (CVE-2026-132092) and a RasterField file write that can lead to remote code execution (CVE-2026-124827). What we found: the RCE belongs to the same bug class Django fixed in August, reached through the one path that the August fix deliberately left open. Teams that patched in August are still exposed, and actual exploitability is much narrower than “Django, 9.8” suggests.
TL;DR
Django released 6.1.4, 6.0.11 and 5.2.20 on 2 December 2026. CVE-2026-132092 is rated 9.8 and CVE-2026-124827 is rated 8.8. Four months earlier, on 4 August, Django fixed CVE-2026-15307, a GDAL raster file write that was also reachable through GeoDjango. No public proof of concept, in-the-wild exploitation or CISA KEV listing exists for either new CVE.
- The RCE is August’s bug, coming in through the other door. August stopped spatial lookups from passing raster definitions to GDAL, but kept accepting them on model field assignment. December’s bug sits on exactly that assignment path, on
RasterField. - Patching in August did not cover you. Django 5.2.17 and 6.0.8 fixed the August CVE and are still vulnerable to both December CVEs.
- The 9.8 belongs to the SQL injection, and it is narrow. It needs
rangeorinlookups over aliases or key transforms that contain a percent sign. That pattern is uncommon in normal application code. - The RCE needs a specific stack. You need GeoDjango on PostGIS, a
RasterField, untrusted input reaching it, and a raster driver that writes files. - Running vulnerable Django does not by itself make you exploitable. Vulnerable versions are widespread across the environments we monitor. Far fewer of them combine the conditions above.
Fixed versions: 5.2.20, 6.0.11 and 6.1.4.
What changed on December 2?
Two unrelated bugs shipped in one release, with different conditions and different risk.
CVE-2026-132092: SQL injection in range and in. These lookups were injectable in queries involving aliases or key transforms that contain percent signs. Key transforms are how Django reaches into JSON fields, as in data__key.
CVE-2026-124827: file write through RasterField. RasterField is GeoDjango’s field for raster images on PostGIS. An application can assign it a raster definition that includes a name. When that name comes from the user, GDAL, the library behind GeoDjango rasters, can create a file wherever the attacker chooses. Depending on the raster driver, that write can turn into code execution.
How is this connected to August’s CVE-2026-15307?
Both bugs come down to one sentence: GeoDjango hands values to GDAL, and GDAL decides they mean “write a file”.
In August, the entry point was spatial lookups. When an application filtered on a geometry or raster field, Django first tried to parse the filter value as a raster. A Python dict, or a string holding its JSON form, made GDAL open the raster in write mode and write a file whose name and contents the attacker controlled. Any other string was treated as a data source path, which allowed outbound requests through GDAL’s virtual file system handlers, for example /vsicurl/. A staff user with view permission could reach it through the admin changelist filters.
August’s fix rejected dict values, and strings that aren’t valid geometry, in spatial lookups. The advisory said explicitly that model field assignments still accept these types.
December’s CVE fixes that assignment path: a raster definition assigned to RasterField with a user-controlled name. Django has not presented it as a follow-up to August. The connection is our reading of the two advisories side by side. The same primitive came in through a different door.
Who is actually exposed?
Everyone on an unfixed version should patch. Only a subset can be exploited today.
- Any Django app on 5.2 before 5.2.20, 6.0 before 6.0.11 or 6.1 before 6.1.4: patch. The SQL injection is in core Django, but exploitation requires the alias or key transform pattern with attacker influence.
- GeoDjango on PostGIS with a
RasterField: patch first. This is the only setup where the RCE path exists. Pay most attention where untrusted users can submit data that reaches the field. - Apps that patched to 5.2.17 or 6.0.8 in August: still vulnerable. Those versions predate December’s fix.
- Container images: rebuild them. Upgrading Django on a laptop fixes nothing in an image that bundles the old version.
What’s true and what isn’t?
- “Every Django app is critical.” No. The 9.8 applies to a SQL injection that needs a specific, uncommon query pattern.
- “Django4Shell is unauthenticated RCE on any Django site.” No. It needs GeoDjango, PostGIS, a
RasterField, untrusted input and a file-writing driver. - “We patched the GDAL issue in August, so we’re fine.” No. August’s versions are vulnerable to December’s CVEs.
- “There’s a public exploit.” No. No proof of concept has been published, and neither CVE is in CISA’s KEV catalog.
How can exploitation be detected?
The write itself is quiet, so watch the edges around it.
- Raster
namevalues or form input containing paths,../sequences or GDAL/vsiprefixes. These are probing or exploitation attempts against GeoDjango. - The Django or Python worker writing files outside the application and media directories. In particular, watch for writes to locations the application later imports or executes.
- Unexpected child processes from the web worker, such as shells or download tools. This is the strongest sign that a file write became code execution.
- Database errors around
rangeorinqueries on JSON fields. These can signal someone probing the SQL injection.
What should security teams do now?
- Upgrade to 5.2.20, 6.0.11 or 6.1.4 and rebuild your images. This is the only complete fix for both CVEs.
- Don’t assume August’s patch covers you. Check the running version, not the last ticket you closed.
- Find every
RasterFieldand patch those apps first. Searching your code forRasterFieldanddjango.contrib.gisnarrows the list quickly. - Until you can upgrade, keep untrusted input away from
RasterField. Seteditable=Falseand exclude the field from the admin,ModelForms and writable serializers.
How can Upwind help?
The lesson of this release is that the version number tells only half the story. Running an affected Django matters less than whether the workload uses GeoDjango and lets untrusted input reach GDAL. Upwind inventories packages in running workloads and container images and maps them to known CVEs, so you can find every affected Django and patch the internet-facing ones first.
If a file write does become code execution, it shows up at runtime. Upwind watches process execution and lineage and outbound connections, including shells and tools spawned by a Python web worker that has no reason to start them.
To learn more about how Upwind finds vulnerable workloads and detects post-exploitation activity at runtime, schedule a demo.
