Django security release: should you upgrade now?
Two of the seven are rated high. One fix changes how raster fields behave in forms, so test GeoDjango code as you upgrade.

Yes, upgrade now. The Django security release of December 2 fixes seven flaws in versions 6.1.4, 6.0.11 and 5.2.20, and the project urges all users to move as soon as possible. The one drawing most attention, nicknamed Django4Shell, can let GeoDjango sites be made to write files.
Which versions does the Django security release fix?
The fixes are in Django 6.1.4, 6.0.11 and 5.2.20, one release for each of the three branches named in the advisory. Patches also went into the main development branch. All three release notes count two flaws rated high, one rated moderate and four rated low under Django's own severity policy.
Each version carries ordinary bug fixes too. The 6.1.4 notes list several fixes for problems in 6.1.3, among them regressions affecting Oracle, SQLite and combined querysets. The 6.0.11 and 5.2.20 releases each fix one GeoJSON error handling bug.
If you run an older series such as 5.1, 5.0 or 4.2, there is no patch for you here. BreachNews reports that Django didn't evaluate those series, says they may also be affected and no longer sends them security fixes. Plan a move to a supported branch.
What is the Django4Shell RasterField flaw?
Django4Shell is CVE-2026-124827, a server-side file write through RasterField, the GeoDjango model field for raster map data. Django says that assigning a raster data definition with a user-controlled name and a non-default driver could make GDAL, the underlying geospatial library, write a file wherever an attacker chooses. Depending on the driver, that could lead to remote code execution.
The field falls back to a plain text form field. That left the flaw reachable by default on models with a raster field registered in the admin, used in a ModelForm or exposed through a writable model serializer. Geometry fields aren't affected, and Django says raster fields are only implemented on PostGIS.
Django rates it high. The Hacker News gives it a CVSS score of 9.0, while BreachNews reports that the National Vulnerability Database entry lists 8.8 under CVSS 3.1.
How could an attacker use it on a real site?
An attacker would need a way to put a crafted value into a raster field, and the researcher who reported the bug, Mohammed Fathy of Robusta Technology Group, told The Hacker News that the main requirement is a staff-level login. A stolen or misused staff account with access to the affected form would do, where the other conditions hold.
Those conditions, as Fathy describes them, are a model with a raster field, a route to it through forms or the stock admin, GDAL's EHdr driver and a directory the web process can write to. He argues that the last three are common in a standard GeoDjango setup.
The danger comes from what gets written. Fathy says a planted Python startup file in the project's working directory can run the next time a worker or scheduled command starts, with the rights of the web server user.
What else is fixed in these Django versions?
The second high-rated bug is CVE-2026-132092, a potential SQL injection in range and in lookups. It applies to queries involving aliases or key transforms that contain percent signs. The __range case also needed code that wrongly passed more than two values, and the __in case needed a bilateral transform. The range lookup now requires exactly two values.
The moderate one, CVE-2026-115868, is a possible cross-site scripting hole in the truncatechars_html filter when output lands in an HTML attribute. Among the low-rated four, CVE-2026-125673 could, in some configurations, let an unauthenticated visitor poison the cache for certain URLs through dot segments in a request path. CVE-2026-119642 and CVE-2026-127929 let staff users with view permission dig out data through the admin list page. CVE-2026-132809 is a memory overflow that needs geometries larger than 4GB.
Will upgrading break any existing GeoDjango code?
It can, if your project edits raster fields through forms or builds them from dictionaries that name another driver. After the fix, RasterField defaults to editable=False, so a ModelForm leaves it out unless a developer includes it on purpose. Assigning a dictionary or JSON string that names a non-default driver now raises GDALException. Code that depends on another driver has to wrap the definition in GDALRaster, which tells Django the value is trusted.
Wrap only values your own code controls. Django also warns that the new exception only limits file writes, so forged requests from the server remain a risk. If untrusted input can reach a raster field, you still need to validate it first. This is the third GeoDjango raster fix in a few months, after related patches in August and October, so raster inputs deserve a proper review.
Has anyone exploited these Django flaws yet?
No exploitation had been reported when the fixes came out. BreachNews says the Django advisory doesn't mention attacks in the wild and that it had seen no reports of any. Daily CyberSecurity lists all seven flaws as not exploited. That can change quickly now that the patches and a public description of the file-write bug are out.
Patching also won't remove anything planted earlier. BreachNews advises checking project directories and site-packages for unexpected .py or .pth files, especially new ones, and reading admin logs for staff edits to models with raster fields. A stray file means treating the host as compromised. Rotate any secrets the application could read, clean up, then restart the workers. Our guide to poisoned Microsoft agent-framework packages covers a similar Python cleanup job.
What should teams do about Django today?
Upgrade every supported project, then check the ones that use maps.
- Move to Django 6.1.4, 6.0.11 or 5.2.20, matching the branch you run. For pip installs, Django's upgrade guide points to the
-Uflag. - Search
INSTALLED_APPSfordjango.contrib.gisand your models forRasterField. - Test raster forms, admin pages and serializers, since the new defaults can change them.
- Clear caches that could hold bad entries, because the fix doesn't invalidate responses already cached.
- Look for unexplained startup files and odd admin edits on GeoDjango hosts.
- Schedule a branch upgrade for anything on an unsupported series.
Related: checking for poisoned agent-framework versions, fixing the WP Rocket flaw.