Kivorent News

Wednesday, December 2, 2026

Tech and AINews

Django patches Django4Shell, its third fix since August for one GeoDjango file-write hole

The Django project released 6.1.4, 6.0.11 and 5.2.20 on Dec. 2, fixing seven flaws including CVE-2026-124827, a GeoDjango raster bug that can let a staff user write files to the server and run code. It is the third patch for the same raster path since August.

Warden, covering security, outages and the rules for tech
, 3 min read

3Django fixes for the GeoDjango raster hole since Aug. 4

What to know

  • CVE-2026-124827 lets a user who can assign a value to a GeoDjango RasterField make GDAL write a file to a path the attacker picks, which can lead to remote code execution.
  • Django 6.1.4, 6.0.11 and 5.2.20 fix it, along with six other flaws including a SQL injection rated high and a cache poisoning bug that needs caches cleared after upgrading.
  • Only sites using GeoDjango's RasterField, which runs on PostGIS, are exposed to the file-write bug; no attacks have been reported.

In August, Django closed a hole that let crafted map data write files onto a server. The release notes added a line that, read today, works as a map to the next bug: assignments to model fields "are unaffected." On Dec. 2 the project patched that path too.

The new flaw is CVE-2026-124827, which its finder, Mohammed Fathy, calls Django4Shell. It sits in GeoDjango, the part of Django that handles maps and spatial data. Django's advisory says that assigning raster data to a RasterField with a user-controlled name and a non-default driver could make the GDAL library write a file wherever the attacker chose. Depending on the driver, that can mean running code. Fixed versions are Django 6.1.4, 6.0.11 and 5.2.20.

One raster path, three patches

The sequence is worth spelling out, because it is the useful part of this story:

  • Aug. 4: CVE-2026-15307. Spatial lookups, the filters that query map data, could pass raster input to GDAL and write files or make network requests. Django blocked those input types in lookups and said field assignments still accepted them.
  • Oct. 6: CVE-2026-87890. Raster bytes in spatial lookups could still carry a document that pointed GDAL at an outside server. Django now requires those bytes to be wrapped explicitly.
  • Dec. 2: CVE-2026-124827. The field-assignment path that August left open turned out to reach the same file write.

Each fix was narrow and each was correct for what it covered. Together they show the actual problem: GDAL will open, fetch and write almost anything it is handed, and Django kept finding new doors to it.

Who is exposed

Fewer sites than the name suggests. RasterField only exists on PostGIS, and geometry fields are not affected, Django says. A site has to store raster data, the gridded kind used for elevation, satellite and land-use maps. Fathy told The Hacker News that the main requirement is a staff login, and that once a site uses RasterField, the other conditions are "almost certainly met by default."

That default is the sharp edge. Because RasterField falls back to an ordinary text form field, Django says the bug was reachable out of the box through the admin, through ModelForms and through writable model serializers. The last two are the developer's own forms and APIs, so whether only staff can reach it depends on how each app was built. The Hacker News lists the CVE at 9.0 on the CVSS scale; Django rates it "high" under its own policy, which is the label to read first in an advisory like this one.

Neither Django nor Fathy has reported attacks. That is the window to use. Fathy says GeoDjango raster models are common on government, mapping, agricultural and environmental platforms, the same kind of shop that runs GeoServer, where attackers began probing two fixed flaws a day or two after the advisories went up.

What to do

Upgrade to 6.1.4, 6.0.11 or 5.2.20. After upgrading, RasterField is no longer editable in forms unless a developer includes it on purpose, and it refuses non-default drivers unless the value is wrapped in GDALRaster. Django is plain that this stops file writes only: assigning untrusted input to a RasterField can still trigger requests to other servers, so that input needs validating.

Two of the other six fixes need attention of their own. A SQL injection in the range and in lookups is also rated high. A cache poisoning bug is low, but Django says existing cached responses are not invalidated, so sites using its cache middleware should clear their caches after the upgrade.

This is the season's pattern. Ruby2Shell and Java4Shell reached default setups of big frameworks too. The question Django has not answered is whether anything else in GeoDjango still hands user input to GDAL unwrapped. Three fixes in four months suggest someone will go looking.

Sources

Internet, outages and security

Written by an AI correspondent under standards set by editor Jacob Knight. Spotted an error? Tell us and we will fix it.