Django has shipped security releases fixing seven flaws, led by a GeoDjango file-write bug nicknamed Django4Shell that can end in remote code execution. It is the third attempt to close the same class of GDAL raster problem this year, so teams who patched in August or October still need to upgrade.
What happened
On 2 December 2026 the Django project published versions 6.1.4, 6.0.11 and 5.2.20, covering the 6.1, 6.0 and 5.2 release lines plus the main development branch. The advisory lists seven CVEs and urges every Django user to upgrade as soon as possible.
Two of the seven are rated “high” under Django’s own security policy. The first, CVE-2026-124827, is a server-side file write reachable through RasterField, the raster data type in GeoDjango (django.contrib.gis). Researcher Mohamed K. Fathy of Robusta Technology Group reported it and has branded it Django4Shell. The second, CVE-2026-132092, is an SQL injection in the range and in query lookups.
The other five are lower priority: a moderate cross-site scripting issue (CVE-2026-115868), and low-rated cache poisoning (CVE-2026-125673), admin changelist leaks (CVE-2026-119642, CVE-2026-127929) and a heap overflow for geometries over 4GB (CVE-2026-132809).
At the time of writing, none of the sources I reviewed reports a public proof of concept, exploitation in the wild or a CISA Known Exploited Vulnerabilities listing.
The technical picture
Django4Shell is best understood as unfinished business. In August 2026 Django fixed CVE-2026-15307, which let crafted rasters in GeoDjango spatial lookups make GDAL write files. October brought CVE-2026-87890, a server-side request forgery using crafted GDAL Virtual Raster payloads that the August fix had missed. The December bug is a third route to the same underlying weakness: the protections added to spatial lookups never covered the path where a raster definition is assigned directly to a model field.
According to the Django advisory, if a raster definition with a user-controlled name and a non-default GDAL driver is assigned to a RasterField, GDAL can be made to write a file wherever the attacker chooses. Because RasterField falls back to an ordinary text form field, that path was open by default wherever the model was registered in the admin, used in a ModelForm or exposed through a writable serialiser. Fathy told The Hacker News that the attacker controls the path, the filename and the content, which opens the door to overwriting application code or planting a file the Python interpreter loads automatically the next time a worker starts. Code then runs as the web server’s operating system user.
The fix changes RasterField’s default so it is no longer editable, keeping it out of ModelForms unless a developer deliberately adds it back. Assigning a dictionary or JSON string that names a non-default driver now raises an exception; trusted definitions must be wrapped in GDALRaster. Django is explicit that this limits file writes only, and that server-side request forgery remains possible if untrusted input reaches the field. Geometry fields are not affected, and RasterField exists only on PostGIS.
The SQL injection is narrower. The range flaw needs more than two right-hand values, which is itself a misuse, and the in flaw needs a bilateral transform, both in queries with aliases or key transforms containing percent signs.
On severity, the sources do not agree. Django classes CVE-2026-124827 as “high”, not critical. The Hacker News reports a CVSS score of 9.0 and calls it critical, while cloud security firm Upwind lists it at 8.8 and puts the SQL injection at 9.8, adding that the 9.8 figure overstates typical risk given how specific the vulnerable query pattern is. Fathy himself says the “primary requirement is staff-level authentication”. That matters: through the default admin route, an attacker needs a logged-in staff account, rather than attacking an anonymous login page.

Why it matters for UK organisations
Django is a mainstay of UK digital delivery, from public sector services and university research portals to SaaS start-ups. GeoDjango in particular turns up in exactly the sectors Fathy highlights: government, mapping, GIS, environmental and agricultural platforms. In the UK that means planning tools, flood and land-use mapping, and utilities asset systems.
The staff-authentication requirement lowers the urgency for most sites, but it does not make the bug harmless. Admin accounts on such systems are frequently shared among contractors and not always protected by phishing-resistant MFA. Django also names ModelForms and writable serialisers as vulnerable paths, so any application that exposes RasterField through a public form or API is in a worse position than the admin-only case suggests.
The patch history is the real story. Organisations that responded promptly in August and October could reasonably believe this class of bug was closed. It was not, and anyone whose vulnerability management tracks “patched for the GDAL issue” as a done item has a false sense of security.
Expert view
In my experience, the most dangerous phrase in a patch ticket is “already fixed”. Three advisories in four months for one feature tells me the root cause, untrusted raster definitions reaching GDAL, has been treated one entry point at a time. That is not a criticism of Django’s security team, who have been transparent about each gap. It does mean defenders should assume a fourth path is possible and design accordingly.
When we test Django estates, the admin interface is consistently the softest high-value target: default URL, password-only logins, and staff flags handed out generously. A flaw that turns “staff user” into “code execution on the host” converts an ordinary credential compromise into a full server compromise. I would not ignore the 9.0 and 8.8 scores, but I would weigh them against your own exposure, which is precisely why Django’s “high” rating and the researcher’s caveat deserve equal billing.
The SQL injection I would class as a code-review exercise rather than an emergency. Patch it, but do not let it crowd out the GeoDjango work.
What to do now
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20 and rebuild container images; check the running version rather than the requirements file. This maps to the Cyber Essentials security update management control.
- Find every RasterField. Search code for RasterField and django.contrib.gis and prioritise those applications first.
- If you cannot patch today, set RasterField to non-editable and remove it from admin forms, ModelForms and writable serialisers, as Upwind and the Django fix both indicate.
- Harden the admin. Restrict it by network, enforce MFA for staff accounts and prune the staff flag, in line with Cyber Essentials user access control.
- Reduce blast radius. Run web workers as unprivileged users with a read-only application directory where practical (secure configuration).
- Hunt. Look for path traversal or GDAL virtual file prefixes in raster inputs, unexpected files written by the Python worker and shells spawned by web processes.
- Plan to leave Django 5.1 and older, which Upwind notes were not evaluated and are unlikely to get fixes.
Bottom line
Django4Shell is not an internet-wide emergency: it needs GeoDjango with rasters and, via the default route, a staff login, and nobody has reported exploitation. But it is a genuine path from a stolen admin account to code on the server, and it survives two earlier patches. If you run GeoDjango, patch this week and treat your admin interface as part of your perimeter.