Threat Intelligence

Django4Shell: Critical GeoDjango Flaw Could Let Attackers Run Code on Your Web Server

The Hacker News · 2 Dec 2026
Key Takeaway If your business runs Django with GeoDjango raster data, update to 6.1.4, 6.0.11 or 5.2.20 as soon as possible and treat staff accounts as a real attack path.

The Django maintainers have released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven security vulnerabilities. The most serious is CVE-2026-124827, rated 9.0 on the CVSS scale and codenamed Django4Shell by researcher Mohamed K. Fathy of Robusta Technology Group. It could potentially lead to remote code execution.

The flaw is the latest in a chain of incomplete fixes in GeoDjango, Django's geographic module. An August 2026 fix for CVE-2026-15307, which allowed server-side file writes, was followed by a patch for CVE-2026-87890, a server-side request forgery issue in the same module. That patch overlooked a path: raster values assigned to RasterField were not covered by the protections. Django says that assigning a raster definition with a user-controlled name and a non-default driver could make GDAL write a file to an attacker-chosen location.

According to Fathy, an attacker could control the file path, content and filename through a crafted JSON raster body. That could allow overwriting application code, planting web shells, or corrupting configuration files. He described how a planted Python startup file could run the next time a worker restarts or a scheduled job runs, with the privileges of the web server user. From there, an attacker could read secrets and environment variables, change or steal data, and move into the wider network.

Exploitation needs four pre-conditions. Three are met by default in a standard Django/GeoDjango deployment, and the main requirement is staff-level authentication. Because RasterField falls back to a basic text form field, the flaw is reachable by default where it is registered in the admin, ModelForms or writable serializers. Fathy advises that organisations using GeoDjango with raster data should consider themselves exposed until patched. The release also fixes an SQL injection (CVE-2026-132092), a cross-site scripting issue (CVE-2026-115868) and a cache poisoning flaw (CVE-2026-125673).

Why it matters

This breaks the assumption that a staff-only admin login is a safe boundary: a compromised or malicious staff account could become full code execution on the web server. Teams that patched the earlier two GeoDjango issues may believe they are covered, yet this one sits in an assignment path those fixes missed. Anyone using RasterField through the admin, ModelForms or writable serializers is exposed by default.

What to do

  • Upgrade Django to 6.1.4, 6.0.11 or 5.2.20 as applicable.
  • Check whether any models use RasterField and whether they are exposed through the admin, ModelForms or writable serializers.
  • Review staff accounts and remove access that is not needed.
  • Wrap raster byte values in GDALRaster before spatial lookups, as the maintainers now require, and test for the backward incompatible change.
Django GeoDjango RCE CVE-2026-124827 Patch Management

Summarised by CISO AI from The Hacker News, written with Claude Sonnet 5.5. We link back to every original so you can read it yourself.