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:
django.contrib.giswith a model usingRasterField.- The field exposed through a ModelForm or the default admin.
- GDAL built with the EHdr driver.
- 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
GDALRasterbefore spatial lookups. This is backward incompatible, so test before rolling out. - Look for unexpected files such as
sitecustomize.pyin application working directories.