The Django project put out security releases 6.1.4, 6.0.11 and 5.2.20 on Dec. 2, 2026. Together they fix seven vulnerabilities in the Python web framework. Most of them are rated low or moderate, though a second one, a potential SQL injection, is also rated high. The headline bug is the GeoDjango one. CVE-2026-124827 lets data assigned to a GeoDjango RasterField create files at locations an attacker controls. According to the advisory, that can become remote code execution depending on which raster driver handles the data.
Django rates the bug "high" under its own severity policy. The researcher who found it calls it "Django4shell", and The Hacker News reports a CVSS score of 9.0 for it. The OSV record lists a CVSS v4 score of 8.7 (High). It is also the third time this year that the project has had to patch the same corner of GeoDjango.
What RasterField is, and why it matters here
GeoDjango is Django's built-in toolkit for geographic data. It sits on top of GDAL, the widely used open-source library that reads and writes geospatial file formats. Besides the familiar geometry fields (points, polygons and so on), GeoDjango offers a RasterField for storing gridded data such as satellite imagery or elevation maps. The Django advisory notes that RasterField is only implemented on the PostGIS database backend, so only PostGIS projects can be affected.
Raster data can be handed to the field in several forms, including a dictionary or JSON "data definition" that describes the raster. According to the OSV record for the CVE, that definition carries a name parameter. Because of this flaw, the name parameter could be used to make files at attacker-controlled locations on the server. Whether that becomes code execution depends on the GDAL driver doing the writing. The researcher, as quoted by The Hacker News, says the impact includes overwriting application code, dropping web shells and reading secrets.
Django's advisory says geometry fields are not affected.
A third attempt at the same problem
The Hacker News reports that Django4shell is an incomplete fix for an incomplete fix:
- August 2026: CVE-2026-15307 fixed a file write caused by raster parsing.
- October 2026: CVE-2026-87890 fixed server-side request forgery (SSRF) through GDAL VRT payloads. VRT is GDAL's "virtual raster" format, an XML description that can point at other data sources. The Hacker News says this was itself an incomplete fix for CVE-2026-15307.
- December 2026: CVE-2026-124827 is the incomplete-fix follow-up to CVE-2026-87890.
That history explains why this release changes defaults instead of adding another input filter. In the patched versions, RasterField defaults to editable=False. Django's advisory says this excludes the field from a ModelForm unless it is explicitly included. Before the change, RasterField fell back to the CharField form field, so the flaw was reachable by default through the admin, ModelForms or writable model serializers. The field also now raises a GDALException when it gets a dict or JSON definition that names a non-default driver. Developers who really need another driver have to say so explicitly by wrapping the data in a GDALRaster object.
The bug was credited to Mohammed Fathy. The Hacker News identifies him as Mohamed K. Fathy of Robusta Technology Group. He told the publication that exploitation requires four preconditions, and that a standard GeoDjango deployment meets three of them by default; the primary requirement, he said, is staff-level authentication. He named government, mapping, GIS, agriculture and environmental platforms as places where such deployments are common. ZeroDayFeed has not independently checked the researcher's precondition count or the 9.0 score. Django's own rating is "high." None of the sources reports that the flaw has been exploited in the wild.
The other six fixes
The rest of the release is lower-key, but some of it still needs attention:
- CVE-2026-115868 (moderate): cross-site scripting (XSS) in the
truncatechars_htmltemplate filter. The filter shortens HTML for display, and Django says certain inputs whose text length matched the truncation length could enable XSS when rendered in an HTML attribute. - CVE-2026-125673 (low): cache poisoning through dot segments in paths (the
.and..parts of a URL). Django advises clearing caches after upgrading, because entries poisoned before the patch would stay in place. - CVE-2026-119642 and CVE-2026-127929 (low): two information leaks in the admin changelist, which staff users with view permissions could abuse to enumerate data. The changelist is the list view of records in Django's admin interface.
- CVE-2026-132809 (low): a heap overflow in
OGRGeometry.wkbthat is triggered by geometries larger than 4 GB. - CVE-2026-132092 (high): potential SQL injection in the
rangeandinlookups when percent signs appear in aliases or key transforms. The range lookup now requires exactly two right-hand side values.
What It Means for Defenders
Who is affected. According to the OSV record, CVE-2026-124827 affects Django 6.1 before 6.1.4, 6.0 before 6.0.11 and 5.2 before 5.2.20. Only projects that use GeoDjango's RasterField on PostGIS are exposed to this specific bug, and the risk is highest where raster data can reach the field from users, for example through the admin, ModelForms or API serializers that accept writes. OSV notes that the older, unsupported series 5.1.x, 5.0.x and 4.2.x were not evaluated and may also be affected. Treat those as vulnerable and plan an upgrade to a supported branch.
What to do now:
- Upgrade to 6.1.4, 6.0.11 or 5.2.20, matching your release line. The update covers all seven issues, so do it even if you don't use GeoDjango.
- Look for RasterField in your code. If a model uses it, find every path where outside input can set it: admin pages, ModelForms, and REST or GraphQL serializers that declare fields explicitly. The new
editable=Falsedefault changes Django's own forms, but a serializer or form that lists the field by name may still accept it. Confirm that is what you want. Django also warns that this fix only limits server-side file writes: server-side request forgery is still possible if untrusted input is assigned to RasterField, so validate input before accepting it. - Expect behavior changes. Code that sets rasters with a dict or JSON definition naming a non-default driver will now raise
GDALException. Legitimate uses need to be rewritten to wrap the data inGDALRaster. Test this before rolling out to production. - Clear your caches after upgrading, as Django recommends for CVE-2026-125673.
- Check vulnerable GeoDjango hosts for signs of compromise. Given the reported impact (overwritten code, web shells, stolen secrets), look on servers that exposed RasterField input for unexpected new or changed files in application and web-served directories. If you find anything suspicious, rotate the secrets that application can read, such as the Django
SECRET_KEY, database credentials and API tokens. - Look again at the August and October fixes. If you held off on the CVE-2026-15307 or CVE-2026-87890 updates, this release replaces them. Don't count either of those earlier patches as a complete defense.
For federal contractors working toward CMMC, keep a record of the upgrade and the RasterField exposure review with your flaw-remediation records. A component whose defaults changed because of a security fix is the kind of item an assessor may ask about.