The Morning Patch Wire

CYBER SECURITY NEWS REPORT

EXPLAINER · WEDNESDAY, DECEMBER 2, 2026

Django4Shell (CVE-2026-124827): who is exposed, how to check, and why GeoDjango needed a third fix

Django 6.1.4, 6.0.11 and 5.2.20 fix seven security bugs. The worst lets a logged-in staff user with a GeoDjango raster form write a file where the attacker picks, which can lead to running code. This page shows who is exposed, a short check, and why this is the third fix in the same code since August.

This explains reporting by Django security releases issued: 6.1.4, 6.0.11, and 5.2.20 (Django project, Dec. 2, 2026).
Read the original first: https://www.djangoproject.com/weblog/2026/dec/02/security-releases/

In one minute

What broke

GeoDjango is Django's add-on for maps and spatial data. A RasterField stores grid data, like elevation maps or satellite images. Django hands raster data to GDAL, a widely used library that reads and writes geodata files.

Django's advisory says that assigning a raster definition to a RasterField, with a user-controlled name and a non-default driver, could make GDAL write a file to an attacker-controlled location. Depending on the driver, that could enable remote code execution.

Why forms matter: RasterField falls back to a plain text form field. So the bug was reachable by default on models with a RasterField registered in the admin, used in a ModelForm, or used in a writable serializer.

The finder, Mohammed Fathy of Robusta Technology Group, told The Hacker News the attacker controls the file path, the content and the file name. His example is writing a sitecustomize.py file, which Python loads at start, so the code runs the next time a worker restarts. His advisory page says the write happens during form validation, inside form.is_valid(), before anything is saved.

Three fixes, one area

This is the third Django advisory about GeoDjango rasters in four months:

Our reading: each fix closed the input path that was reported and left a nearby one open. The December fix changes a default instead. RasterField now has editable=False, so it drops out of a ModelForm unless you add it on purpose. A dict or JSON value with a non-default driver now raises GDALException.

The fix is not a full wall. Django says server-side request forgery (making the server fetch a URL for the attacker) is still possible if untrusted input reaches a RasterField. Django asks you to validate raster input yourself.

Who can reach which bug

The seven bugs do not need the same access. Sorted by who can reach them, from Django's advisory:

So the scariest bug needs a login, and one of the low ones does not. Rate them for your own app, not by the headline.

Check your project

These are plain commands. We did not run them against a real GeoDjango app.

# Which Django do you run? Fixed versions: 6.1.4, 6.0.11, 5.2.20
python -m django --version

# Do you use RasterField anywhere?
grep -rn "RasterField" --include=*.py .

# Does your GDAL build include the EHdr driver the finder used?
gdalinfo --formats | grep -i ehdr

If grep finds no RasterField, the file write bug does not apply to you. Upgrade anyway for the other six.

If it finds one, check whether that model is in the admin, a ModelForm or a writable serializer. Those are the paths Django names.

After the upgrade, clear your cache if you use Django's cache middleware or cache_page.

Who is affected

CaseStatus
Django 6.1 before 6.1.4Affected. Fixed in 6.1.4.
Django 6.0 before 6.0.11Affected. Fixed in 6.0.11.
Django 5.2 before 5.2.20Affected. Fixed in 5.2.20.
Django main branchPatched.
Apps with geometry fields onlyNot affected by the file write bug, per Django.
Databases other than PostGISRasterField is only built for PostGIS.

What to do

What is still unknown

Sources

Today's full edition: Cyber Security News Report · every headline, every morning.