Django developers have released urgent security updates after discovering a critical vulnerability that could allow attackers to execute malicious code on affected web servers. The flaw, nicknamed Django4shell, affects GeoDjango, the component of Django used for geographic and geospatial applications. It has been assigned the identifier CVE-2026-124827 and carries a CVSS severity score of 9.0, placing it in the critical category. The vulnerability was reported by Mohamed K. Fathy, head of cybersecurity at Robusta Technology Group.
Django maintainers have addressed the issue in versions 6.1.4, 6.0.11, and 5.2.20. These releases fix seven security vulnerabilities in total, but Django4shell is considered the most serious because it can potentially lead to remote code execution, or RCE. Remote code execution is particularly dangerous because it may let an attacker run commands on a server with the same privileges as the web application.
The new flaw is part of a chain of incomplete fixes. In August 2026, Django addressed CVE-2026-15307, a high-severity issue in GeoDjango’s spatial lookup raster parsing mechanism that could enable server-side file writes and potentially remote code execution. A later vulnerability, CVE-2026-87890, allowed server-side request forgery through crafted GDAL Virtual Raster payloads. However, the protection introduced for that issue did not cover every vulnerable path.
Django4shell exists because the earlier protections do not extend to the RasterField assignment path. An attacker may be able to submit a specially crafted JSON raster body that controls the target file path, filename, and contents. This can cause the GDAL library to write a file to a location chosen by the attacker, creating an arbitrary file-write capability. Hence, the consequences can be severe.
According to the researcher, an attacker could overwrite application source code, place a web shell in a static directory, or corrupt configuration files. A particularly dangerous method involves writing a sitecustomize.py file into a directory on Python’s module search path. Python automatically imports this file when it starts, meaning the malicious code could execute before the Django application runs—during a server reload, Gunicorn worker restart, management command, or subprocess launch.
The vulnerability is especially concerning because it can be reached through common Django features. Models using RasterField may be exposed through the Django admin interface, ModelForms, or writable model serializers. GeoDjango is commonly used in government, mapping, GIS, agricultural, and environmental platforms, while the EHdr raster driver is included in standard GDAL installations.
The main requirement for exploitation is staff-level authentication, so attackers generally need access to a privileged account. Successful exploitation could also allow attackers to drop .pth files into site-packages, read secrets and environment variables, steal or alter data, and move further into the host or network. Organizations using GeoDjango with raster data should update immediately to a patched Django version and review admin access, file permissions, and exposed raster fields.
