December 4, 2026
Does Django4Shell Affect Your Django App? (Python)

By Soumya Ranjan Sahoo
3 min read
Django's December security update fixed seven vulnerabilities. The one that made headlines began with a map field that looked like an ordinary text box.
Imagine you maintain a trail-mapping app. A park employee needs to update the elevation data for a hiking area, so you give them a form in Django's admin. They enter the new data and click Save. If someone asked you to review that feature, where would you start? Probably with who has permission to edit the map. Maybe with whether the elevation values make sense.
Would you think to ask whether that field could write a file on your server?
That's the surprising part of Django4Shell, the nickname for CVE-2026โ124827. On December 2, 2026, Django disclosed a flaw in GeoDjango's RasterField. On affected versions, processing untrusted data assigned to that field could cause a server-side file write. Depending on the raster driver involved, remote code execution was possible. For anyone maintaining a Django app, the first question is quite specific: Does any part of my deployed application let untrusted input reach a RasterField?
What the text box was doing
Think of the trail map as a sheet of graph paper laid over a mountain. Write an elevation in each square and you have a raster: a grid in which each cell holds a value. GeoDjango supports this kind of data through RasterField on PostGIS. A trail drawn as a line or a campsite marked as a point uses a different kind of field. Django explicitly says geometry fields were outside the scope of this vulnerability.
Here's where the form becomes interesting. On affected versions, Django could represent a model's raster field with a text field in a generated form. Once someone submitted a value, the model could pass the raster definition to GDAL, the library responsible for processing it. Under the conditions described in the advisory, GDAL could write a file while handling that definition. From the developer's side of the screen, the form still looked like a place to edit map data.
There's a lot to appreciate about a framework that can turn a model into a working admin page. That convenience also makes one question easy to overlook during code review: What will the server actually do with the value in this box?
How to check your application
Start with the Django version serving real requests. Run this command in the same Python environment as the deployed application. If you use containers, run it inside a running application container.
python -m django --versionpython -m django --versionDjango issued the following security releases on December 2. If you run one of these branches, use its fixed release or a later supported patch release. www.djangoproject.com
Django branch December 2 security release 5.2 LTS 5.2.20 6.0 6.0.11 6.1 6.1.4
Next, look for RasterField in your project and in the installed Django apps your deployment uses. A search through your own models.py files is a good start, but a reusable app can supply models too. If you find a raster field, trace how it gets its value. Django identifies admin forms, model-generated forms, and writable serializers as places worth checking. Include any application code that assigns raster data directly. Django
Then ask who controls the input. In the trail-map example, an employee might submit data through a restricted admin page. Another application might accept data through a customer-facing API or import a dataset supplied by someone outside the organization. Those are different situations. Knowing who can influence the data helps you decide which workflow to review first.
What changes after the update
Django made RasterField non-editable by default and restricted how raster definitions can select a driver. If staff rely on a generated form to edit raster data, test that workflow after upgrading. The maintainers also identify a remaining concern: untrusted raster input can still cause the server to make unintended network requests. Keep validating what your application accepts.
If your deployment has no raster fields, you can close the specific question that brought you here. The December release still deserves your attention. It fixes six other vulnerabilities, including issues involving HTML truncation, caching, and information disclosure in the admin. Update your dependency pin, rebuild, redeploy, and check the running version once more.
What stays with me about Django4Shell is how ordinary that hypothetical trail-map form looks. A text box, a Save button, a staff member with permission to use both. The next time I review a generated form, I'll follow one value a little further, into the code that receives it. That's where this story would have been hardest to miss.