Django Fixes 'Django4Shell' File-Write Flaw That Can Lead to Remote Code Execution
Django released versions 6.1.4, 6.0.11 and 5.2.20, fixing seven bugs including CVE-2026-124827 (CVSS 8.8), a GeoDjango RasterField flaw with public proof-of-concept details that can enable remote code execution.

Key points
- CVE-2026-124827, dubbed Django4Shell, carries a CVSS score of 8.8 and has publicly available proof-of-concept details.
- Insufficient validation of user-controlled raster data in GeoDjango RasterField lets an authenticated attacker write arbitrary files to the server.
- GeoDjango applications on PostGIS that define a RasterField may be exposed, especially via the admin, ModelForms or writable model serializers.
- The flaw is an incomplete fix for CVE-2026-87890, itself an incomplete fix for CVE-2026-15307.
- The updates also address XSS, cache poisoning, information disclosure, heap buffer overflow and SQL injection issues.
What happened
The maintainers of Django, the open source Python web framework, have published versions 6.1.4, 6.0.11 and 5.2.20, resolving seven security issues. The most serious is CVE-2026-124827, nicknamed Django4Shell and rated 8.8 on the CVSS scale. Proof-of-concept details are already public.
The weakness sits in the GeoDjango RasterField component. Raster data supplied by users is not validated adequately, so an authenticated attacker can write files to any path the application can reach. According to Orca Security, a crafted JSON raster body with a user-controlled name parameter and a non-default GDAL driver can be used to drop Python files, write into site-packages, overwrite source code, plant web shells or corrupt configuration, opening several routes to remote code execution.
Who is exposed
Any GeoDjango application running on PostGIS that defines a RasterField may be affected. Because RasterField falls back to a standard text form field, the issue is reachable by default where such models are registered in the Django admin or used through ModelForms or writable model serializers.
This is the third attempt to close the same attack surface: it completes earlier fixes for CVE-2026-87890 and CVE-2026-15307. Teams that patched those earlier issues should not assume they are covered.
What to consider
The release also fixes XSS, cache poisoning, information disclosure, heap buffer overflow and SQL injection flaws, so upgrading is worthwhile even for applications that do not use GeoDjango. With public exploit details and authenticated access as the only prerequisite, internal portals and partner-facing systems deserve the same priority as public sites.
What to do now
- Inventory all Django applications, including vendor-supplied and outsourced systems, and record their versions and whether GeoDjango RasterField is used.
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20 as appropriate, prioritising PostGIS-backed GeoDjango applications, under an expedited change process.
- Until patched, review whether RasterField models are exposed through the admin, ModelForms or writable serializers, and restrict that exposure and admin access.
- Check affected servers for unexpected files in the working directory or site-packages, modified source code, web shells or altered configuration files.
- Ask third-party developers and service providers to confirm in writing that hosted Django applications have been updated.
How useful was this story?
0.0 out of 5 · 0 ratings
Related frameworks
Our consultants can assess your exposure and map the change to your controls and evidence.