Django4shell (CVE 2026 124827) Why GeoDjango Apps Patched In August Still Need An Update
Snyk Team
December 2, 2026
11 mins readOn December 2, 2026, the Django project released versions 6.1.4, 6.0.11 and 5.2.20, which fix seven vulnerabilities. The most significant is CVE-2026-124827, which Mohammed Fathy of Robusta Technology Group reported and named Django4shell. It affects applications that use GeoDjango (django.contrib.gis) with a model that has a RasterField. A signed-in user who can submit data to a form exposing that field can make the server write a file to a path they choose, which can lead to remote code execution.
Snyk rates the vulnerability High, with a CVSS 4.0 score of 8.7. Exploitation requires staff-level access, and as of publication we are not aware of reported exploitation.
This is the third fix for the same GeoDjango attack surface. Older Django versions are presumed vulnerable as well, as long as they meet the other conditions, since the vulnerable RasterField behavior is long-standing in the package. If you run GeoDjango with a RasterField, update to 6.1.4, 6.0.11 or 5.2.20 and redeploy.
At a glance
Package |
|
|---|---|
Vulnerable versions | 5.2 before 5.2.20, 6.0 before 6.0.11, 6.1 before 6.1.4 |
Fixed versions | 5.2.20, 6.0.11, 6.1.4 |
Snyk ID | |
Severity | High, CVSS 4.0: 8.7, CVSS 3.1: 8.8 |
Weakness | CWE-73: External Control of File Name or Path |
Access required | An authenticated user who can submit a form exposing a |
Exploitation | None reported as of December 2, 2026 |
What is Django4shell?
Django4shell is a file path control weakness in django.contrib.gis.db.models.RasterField. The field accepts a raster data definition as a Python dict or a JSON string. Before the fix, Django passed the definition's name parameter to GDAL, the Geospatial Data Abstraction Library, without restricting which raster driver GDAL used.
The driver decides whether name is safe. With GDAL's in-memory driver, name is only a label. With a file-backed driver such as EHdr, which ships in standard GDAL builds, GDAL writes the raster to the path in name. An attacker who controls the definition therefore controls where the file lands and what it contains.
The write happens as soon as the value is assigned to the field, which includes form validation. Django never needs to write to the database or call model.save() for the file to appear on disk.
Why apps patched in August are still exposed
Django4shell is the third fix for GeoDjango raster handling in four months. Each release closed one route by which untrusted raster input reached GDAL, and the next release addressed a route the previous fix had not covered.
Release date | CVE | What it fixed |
|---|---|---|
August 4, 2026 | Server-side file write and request forgery through raster values in spatial lookups | |
October 6, 2026 | Request forgery through byte values in spatial lookups, which the August fix had missed | |
December 2, 2026 | File write through |
The August and October fixes guarded the spatial lookup path, where raster values reach GDAL through query filters. Neither one guarded the model field itself. As a result, every release before 5.2.20, 6.0.11 and 6.1.4 is vulnerable, including 5.2.17 and 6.0.8, the versions that fixed the August issue.
Who is exposed
An application is exposed when all six of these conditions hold:
It runs Django before 5.2.20, 6.0.11 or 6.1.4.
It enables
django.contrib.gisand defines at least one model with aRasterField.Its GDAL build includes a file-writing driver such as EHdr. EHdr ships in standard GDAL builds on every major platform and package manager, so nearly every GeoDjango deployment meets this condition.
That field is reachable through the Django Admin, a
ModelFormor a writable serializer. BecauseRasterFieldfalls back to Django'sCharFieldform field, registering the model in the admin exposes it by default.An attacker can submit that form, which in most deployments means holding a staff or admin account.
The Django process can write to a directory that Python later loads code from, such as the project root or
site-packages.
Django's advisories cover only its supported release series. The vulnerable RasterField behavior is long-standing, so treat older, unsupported series such as 4.2, 5.0 and 5.1 as vulnerable if they meet the other conditions.
How the attack works
The attack turns a file write into code execution in five steps:
The attacker signs in with an account that can reach a form exposing a
RasterField.They submit a raster definition as JSON that names a file-writing driver, such as EHdr, and sets
nameto a path outside the media directory, typically with../traversal.Django assigns the value while cleaning the form, and GDAL creates the file at that path with content the attacker chose. This happens before any database write.
The attacker targets a file that Python runs automatically. A
sitecustomize.pyin a directory onsys.path, or a.pthfile insite-packages, executes when the interpreter starts.The next time a Python process starts, the code runs with the privileges of the web server's OS user. A worker restart or fork, a development server reload, a
manage.pycommand or a scheduled job is enough.
Planting a startup file is one route to code execution, but not the only outcome. According to the researcher, the same write can drop web shells into static directories or overwrite application source and configuration files. Once code runs with the web server's privileges, an attacker can read secrets and environment variables, modify data and pivot into the host or network.
Abusing Python startup files is a known technique. The LiteLLM supply chain compromise earlier this year used a .pth file the same way, which is why the detection steps below check for these files specifically.
The other six fixes in this release
The December 2 release fixes six more vulnerabilities, and one of them reaches far more applications than Django4shell does. CVE-2026-132092 is a SQL injection in the range and in lookups that applies whether or not an application uses GeoDjango. Snyk rates it Critical, with a CVSS 4.0 score of 9.3, and it requires no privileges. It occurs when a query involves aliases or key transforms whose names contain percent signs, which Django could interpret as SQL format placeholders.
That is the strongest reason to treat this release as a priority even if you don't run GeoDjango. One upgrade fixes every one of them.
CVE | Issue | Snyk advisory |
|---|---|---|
CVE-2026-124827 | Django4shell: file write through | |
CVE-2026-132092 | SQL injection in | |
CVE-2026-115868 | Cross-site scripting in the | |
CVE-2026-125673 | Cache poisoning through dot segments in request paths | |
CVE-2026-119642 | Information disclosure in the Django Admin | |
CVE-2026-127929 | Information disclosure in the Django Admin | |
CVE-2026-132809 | Heap buffer overflow in |
What to do now
Update Django to 5.2.20, 6.0.11 or 6.1.4 or later for your release series. Then rebuild container images and redeploy, because changing the requirements file alone leaves the running version untouched.
Confirm the running version in each environment, including images built from cached layers.
Map your exposure. List the applications that enable
django.contrib.giswith aRasterField, and check whether that field appears in the Django Admin, aModelFormor a writable serializer.Prioritize applications where untrusted or compromised users could submit data to those forms, and internet-facing admin interfaces.
Test raster forms after updating. The fix sets
RasterFieldtoeditable=Falseby default, so it no longer appears in aModelFormunless you include it explicitly. Assigning a dict or JSON definition that names a non-default GDAL driver now raises aGDALException.Clear your caches after the upgrade, since the same release fixes a cache poisoning issue (CVE-2026-125673).
If you can't update right away: Restrict access to the Django Admin, and to any form that exposes a RasterField, to trusted users until you can update.
How to check for signs of exploitation
Because the attack needs a form submission and leaves a file behind, two places carry the evidence: request logs and the file system.
Request logs: review HTTP POST requests to the Django Admin and to any form that accepts raster data. Look for
../path traversal,/vsiprefixes (GDAL virtual file system paths) and driver parameters such asEHdrin request bodies.Python startup files: check the project root, the working directory of each worker and
site-packagesfor unexpectedsitecustomize.pyor.pthfiles.Application and static files: look for recently modified source or configuration files, and for files in static or media directories that your deployment didn't create.
If you find signs of a successful write, treat the host as compromised. Rotate the credentials and secrets the Django process could read, and rebuild from a known-good image rather than cleaning the files in place.
How Snyk helps
Existing Snyk scans pick up all seven advisories.
Snyk Open Source reports projects that depend on an affected Django version, for example through
requirements.txt,Pipfileorpoetry.lock, with the advisory and the fixed versions. You can filter results by CVE ID.The Zero Day report matches your projects to the advisory. In the Snyk app, go to Analytics → Reports → Zero Day → Django4shell RCE Vulnerability - December 2026.
The Snyk Trust Center carries our status updates. As of this publication, based on the available information, the Snyk products are not impacted by this vulnerability. We will continue to monitor.
Want to know which of your Python projects need the December release? Run snyk test in the project directory, or open the Zero Day report in the Snyk app. New to Snyk? Start with a free account and connect a repository to scan it. Want to speak to an expert? Book a demo today.
SEE EVO IN ACTION
Secure AI adoption at scale with Evo
Get a suite of agent-native security solutions that secure, protect, and govern AI-driven development across three loops: the code artifact, the AI workforce, and the AI applications teams build.



