NEWS

Django4Shell (CVE-2026-124827): GeoDjango RasterField Flaw Can Lead to Remote Code Execution; Update to 6.1.4, 6.0.11 or 5.2.20

CVE-2026-124827 (CVSS 9.0) is an incomplete fix of earlier GeoDjango bugs. Django shipped seven fixes; staff-level access is the main requirement.

Dylan H.

News Desk

December 2, 2026
2 min read
Django4Shell (CVE-2026-124827): GeoDjango RasterField Flaw Can Lead to Remote Code Execution; Update to 6.1.4, 6.0.11 or 5.2.20

What happened

Django released 6.1.4, 6.0.11 and 5.2.20 to fix seven security issues. The most serious is CVE-2026-124827 (CVSS 9.0), nicknamed Django4Shell by its finder, Mohamed K. Fathy of Robusta Technology Group, as The Hacker News reports.

How it works

The bug is an incomplete fix for CVE-2026-87890 (October 2026), itself an incomplete patch for CVE-2026-15307 (August 2026, GeoDjango raster parsing). Earlier protections did not cover the RasterField assignment path.

A crafted JSON raster body lets an attacker control the target path, file content and filename. With a user-controlled name and a non-default GDAL driver, GDAL can write files to attacker-chosen locations. Fathy describes writing a sitecustomize.py into the working directory, which Python imports at startup, so the payload runs on the next reload, worker fork, cron job or subprocess.

Who is exposed

Fathy lists four preconditions, three of which he says are usually met by default:

  1. django.contrib.gis with a model using RasterField.
  2. The field exposed through a ModelForm or the default admin.
  3. GDAL built with the EHdr driver.
  4. A writable target path, such as the project root.

The main requirement is staff-level authentication. The report gives no sign of active exploitation or a public proof of concept.

Other fixes in the release

Three of the other six are named: CVE-2026-132092 (SQL injection in range and in lookups), CVE-2026-115868 (possible XSS in the truncatechars_html filter) and CVE-2026-125673 (cache poisoning via dot segments in request paths).

What to do

  • Upgrade to 6.1.4, 6.0.11 or 5.2.20.
  • If you use GeoDjango raster fields through the admin, treat the site as exposed until patched and review who holds staff accounts.
  • Note the October change: raster values passed as bytes must now be wrapped in GDALRaster before spatial lookups. This is backward incompatible, so test before rolling out.
  • Look for unexpected files such as sitecustomize.py in application working directories.

Source