“High”, attack over the network with low privileges, full impact on confidentiality, integrity and availability; 8.7 under CVSS 4.0. The NVD lists the flaw as “Deferred” without its own score. [5][6][42]
Django4Shell CVE-2026-124827A form field for raster data lets Django write arbitrary files to the server, potentially leading to code execution
On December 2, 2026, the Django project released versions 6.1.4, 6.0.11 and 5.2.20, closing CVE-2026-124827, a flaw its discoverer Mohammed Fathy of Robusta Technology Group calls “Django4Shell”. If a crafted raster definition is assigned to a GeoDjango RasterField, the geospatial library GDAL writes a file with a path and content chosen by the attacker to the server. Because Django includes the field as a text field in the admin, ModelForms and writable serializers by default, a staff account is enough, according to the researcher; the file is created as soon as the form is validated, before anything is saved. It is the third fix in the same place, after August and October. No attacks are known, but the attack chain has been publicly described.
- CVSS 3.1: 8.8 · CVSS 4.0: 8.7 (Django as CNA) · Django severity “high”
- Affected: Django 6.1 < 6.1.4, 6.0 < 6.0.11, 5.2 < 5.2.20 with a GeoDjango RasterField
- Fix: Django 6.1.4 · 6.0.11 · 5.2.20 of December 2, 2026
- Reachable via the admin, ModelForms and writable serializers
What happened and what it means for you
Django4Shell is not in an add-on library but in GeoDjango, the geospatial extension of Django itself. The model field RasterField stores raster data in PostGIS and passes assigned values on to GDAL. Until the fix, it also accepted a definition that instructs GDAL to create a file at a freely chosen path using a file-based driver. Three questions determine whether you are affected: does your project use RasterField, does a form or serializer reach the field, and are you running a Django version from before the fix? [1][5][13]
- Only projects that use RasterField are affected. Geometry fields such as PointField or PolygonField are not affected, and RasterField only exists with PostGIS. Projects without GeoDjango rasters are not hit by this flaw; they should still apply the six other fixes in the same release.
- The default setting was the problem. In forms, RasterField fell back to a plain text field. Anyone who registers a model with a raster field in the admin or exposes it via a ModelForm with all fields has made the field writable without writing a single line of code for it.
- Validation alone writes the file. According to the researcher, GDAL creates the file while Django validates the form, that is, before a record is saved. If saving fails, there is no entry in the admin log, but the file is still on the server.
- The file becomes code. The researcher writes a sitecustomize.py to a directory that Python reads at startup. The next time Gunicorn or uWSGI restarts or a manage.py command is run, the code executes with the privileges of the Django process. Similar effects are possible with .pth files or overwritten application files.
- The update changes behavior. After the update, RasterField is not editable by default and is missing from ModelForms that do not explicitly list it. Definitions with a file-based driver raise an error. Projects that deliberately accept rasters via forms need to adapt and add their own checks.
What is established
- Django closed the flaw on December 2 with 6.1.4, 6.0.11 and 5.2.20 and rated it “high”. The Django project’s CVE record gives CVSS 3.1 8.8, CVSS 4.0 8.7 and CWE-73, external control of file name or path.
- Mohammed Fathy reported the flaw on October 22, and it was confirmed on November 9. The fix commits for main, 6.1, 6.0 and 5.2 are public.
- It is the third flaw in the same raster processing: CVE-2026-15307 (August) and CVE-2026-87890 (October) secured raster values in database queries. The August advisory stated that assignments to model fields were not affected; this is exactly the path Django4Shell uses.
- On django4shell.com, the researcher describes the attack chain in 13 steps with an abridged example request. On December 2, we did not find a standalone PoC repository on GitHub.
- The flaw is not in CISA’s KEV catalog, and no attacks are known. The NVD has not yet assigned its own score.
- The same release fixes six other flaws, including an SQL injection in the lookups “range” and “in” (CVE-2026-132092, also “high”) and a cache poisoning flaw for which caches should be cleared after the fix (CVE-2026-125673).
What remains unclear
- When Debian, Ubuntu, Red Hat, SUSE, Alpine and FreeBSD will respond: at around 4 p.m. CET on December 2, none of them had an entry for CVE-2026-124827.
- Whether products with built-in GeoDjango, such as geospatial data platforms, offer RasterField in forms; there were no vendor advisories on December 2.
- Whether the 5.1, 5.0 and 4.2 lines are affected: Django has not assessed them and no longer patches them. RasterField has existed since Django 1.9.
- How quickly the public description will turn into ready-made exploits. VamiSec assessment: the barrier is low.
- How the NVD and CISA will rate the flaw; some media outlets cite CVSS 9.0 without giving a source.
How a form field turns into a shell
The researcher describes the full chain, and Django’s advisory confirms its core: file writes via assignment to RasterField, potentially leading to code execution depending on the driver. The steps show the path via the Django admin; with custom ModelForms and serializers, only the entry point differs. We deliberately do not reproduce the researcher’s example request. [1][13][7][38][40]
- According to the researcher
Access to a form
Attackers need a form that edits a model with a RasterField; in the researcher’s scenario, a staff account with permission to add or change the model in the admin. If such a form is public, even this hurdle disappears.
- According to the researcher and Django’s advisory
Text field instead of raster field
In forms, RasterField falls back to a plain text field. Instead of raster data, attackers enter a JSON definition there that specifies a file-based GDAL driver and a file name and path of their choosing.
- According to the researcher
Validation invokes GDAL
When validating the form, Django reads back the field value and creates a GDALRaster from it, according to the researcher in form.is_valid(), before anything is saved. The safeguard from the October fix only applies to database queries and does not run on this path.
- According to the researcher and Django’s advisory
File with chosen content
GDAL creates the file with the chosen driver. The researcher uses EHdr, a driver for raw binary rasters that is included by default: the pixel values of the definition end up on disk unchanged and can thus form arbitrary text, such as Python code.
- According to the researcher
Code at the next start
If the file is placed as sitecustomize.py in a directory on the Python search path, Python executes it every time it starts: after the next deployment, the restart of a worker or a cron job running manage.py. The code runs with the privileges of the Django process and sees its environment, such as database credentials and the SECRET_KEY.
What Django4Shell is not
- Not a flaw in every Django project: without a GeoDjango RasterField, this path does not exist. Geometry fields and projects without django.contrib.gis are not affected.
- Not an attack without access to the form: attackers have to reach a dialog that accepts the raster field. In the admin, that means an account with permission to add or change the model.
- Not immediate code execution: the file is written immediately but, according to the researcher, only executed when Python restarts. Until then, it is something to look for in a forensic search, and a careless restart can arm it.
Why the flaw is still urgent
- The attack chain is laid out step by step on the researcher’s website. VamiSec assessment: reproducing it is therefore a matter of hours, not weeks.
- Staff accounts are not a high hurdle: they are often shared, rarely protected with MFA and a popular target of phishing and credential stuffing.
- The file becomes persistent access: a sitecustomize.py or .pth file survives restarts and application updates as long as nobody specifically looks for it.
- It is the third fix in four months in the same place. VamiSec assessment: if you use GeoDjango rasters, do not just update but restrict the acceptance of raster data to trusted sources as a matter of principle.
Why the October fix was not enough
Django has tightened raster processing three times since August. Each fix closed one path by which untrusted values reach GDAL; the path via assignment to a model field remained open until December. [14][15][1][7]
| Path to GDAL | What could happen | Status |
|---|---|---|
| Raster value as dict or JSON in a database query | A staff user filters by a crafted raster value, for example in the admin; GDAL writes a file or fetches a URL. | ClosedCVE-2026-153076.0.8 · 5.2.17[14][16] |
| Raster value as bytes in a database query | A crafted VRT document in the bytes makes GDAL send network requests; the first fix had overlooked this path. | ClosedCVE-2026-878906.1.2 · 6.0.9 · 5.2.18[15][17] |
| Assignment to RasterField via the admin, a ModelForm or a serializer | Django4Shell: validation creates a GDALRaster from the field value, and GDAL writes a file to the chosen location. | ClosedCVE-2026-1248276.1.4 · 6.0.11 · 5.2.20[1][5][13] |
| Network requests via assignment to RasterField | Even after the fix, an assigned value can make GDAL fetch URLs (server-side request forgery). For this, Django requires applications to implement their own checks. | Still possible[1][7] |
| GDALRaster in your own code with untrusted input | Anyone who calls GDALRaster directly with user input or deliberately wraps values in GDALRaster declares them trustworthy and must validate them first. | Application’s responsibility[7] |
According to the GeoDjango documentation, since the fix RasterField only allows the in-memory driver MEM for dict and JSON values. This prevents file writes but not network requests; the documentation therefore advises never to assign untrusted input without your own validation and to limit the available GDAL drivers.
Three fixes in four months
Four months passed between the first and the third fix. Anyone who updated in October was protected against the query paths, but not against assignment.
- Vendor
- Vendor
- Research
Report to Django
Mohammed Fathy reports to the Django Security Team that the new check does not take effect when assigning to RasterField. [5]
- Vendor
Security release, flaw still open
Django 6.1.3, 6.0.10 and 5.2.19 fix six other flaws; Django4Shell remains in these versions. [32]
- Vendor
- Research
Researcher publishes Django4Shell
On django4shell.com, Mohammed Fathy describes the chain via the EHdr driver and a sitecustomize.py, with an abridged example request. The site names only Django 6.1.2 as affected and gives no CVE number. [13]
- Media
- Looking ahead
Where a RasterField accepts untrusted values
A project is vulnerable if four conditions coincide. You can check the version here in seconds, and the others with the commands further down.
- Django before 6.1.4, 6.0.11 or 5.2.20
Including 6.1.3, not just the 6.1.2 named by the researcher. Django has not assessed the 5.1, 5.0 and 4.2 lines, and they no longer receive fixes.
- GeoDjango with RasterField
django.contrib.gis is installed, a model uses RasterField, and the database is PostGIS. Geometry fields alone are not enough.
- The field is reachable and writable
The model is registered in the admin, a ModelForm includes the field, for example with fields = "__all__", or a writable serializer accepts it.
- File-based driver and writable target
The EHdr driver used by the researcher is included in GDAL by default. If the Django process can write to the project directory, the working directory or site-packages, the file write turns into code execution.
Django check
Paste the output of python -m django --version or pip show django, or a line from requirements.txt, poetry.lock or uv.lock. The check shows whether the version contains the fix for CVE-2026-124827.
The check runs only in your browser; nothing is transmitted.
The result appears as soon as you enter a Django version, pip output or a dependency line.
- Fixed as of version
- Django 6.1
6.1.4 - Django 6.0
6.0.11 - Django 5.2 LTS
5.2.20
What counts is the version loaded in the running process: check every virtual environment and every container image, and restart workers after the update.
| Platform | Lines | Version with fix | Status |
|---|---|---|---|
| Django 6.1 | 6.1.0 – 6.1.3 | 6.1.4 | Fix availableFix in 6.1.4 of December 2. The entire line up to 6.1.3 is affected, not just the 6.1.2 named by the researcher. [1][2][10] |
| Django 6.0 | 6.0.0 – 6.0.10 | 6.0.11 | Fix availableFix in 6.0.11. The line only receives security fixes until April 2027. [1][3][11] |
| Django 5.2 LTS | 5.2.0 – 5.2.19 LTS | 5.2.20 | Fix availableFix in 5.2.20. The LTS line receives security fixes until April 2028. [1][4][12] |
| Development branch main | main | a3934abd | Fix availableFix commit a3934abd of December 2; projects that install Django from Git need a state from this commit onward. [9] |
| Lines without security updates | 5.15.04.2 LTS≤ 4.1 | – | No fix (EOL)Django has not assessed 5.1, 5.0 and 4.2 for this flaw; the CVE record considers them potentially affected. 4.2 LTS has not received fixes since April 2026, 5.1 since December 2025. RasterField has existed since Django 1.9. [5][18][41] |
| PyPI (pip, Poetry, uv, Pipenv) | pipPoetryuvPipenv | 6.1.46.0.115.2.20 | Fix availableOn PyPI since December 2, around 1:55 p.m. CET. Update lock files, otherwise the next build will install the old version again. [32] |
| Debian | 12 bookworm13 trixie14 forky · sid | – | Fix pendingNo entry in the security tracker as of December 2. bookworm ships Django 3.2 and trixie 4.2, both lines no longer maintained upstream; Debian marked the predecessor flaw CVE-2026-87890 as “ignored” there because it was hard to backport and only affected GeoDjango. forky and sid most recently carried 5.2.19. [25][26] |
| Ubuntu | 22.04 LTS24.04 LTS26.04 LTS | – | Fix pendingNo entry in the Ubuntu CVE Tracker yet. On December 2, the October flaw CVE-2026-87890 was still listed there as “needs-triage” for 22.04, 24.04 and 26.04. [27] |
| Red Hat | SatelliteAnsible Automation PlatformOpenStackEPEL | – | Check noteNo entry yet. Regarding the predecessor CVE-2026-15307, Red Hat stated that its products containing Django, such as Satellite, Ansible Automation Platform and OpenStack, do not use GeoDjango. The Fedora community is responsible for EPEL packages. [28] |
| SUSE, Fedora, Alpine, FreeBSD | SUSE · openSUSEFedoraAlpineFreeBSD | – | Fix pendingOn December 2, SUSE, Alpine and FreeBSD still had no entry for CVE-2026-124827. We were unable to retrieve Fedora’s status. [29][30][31] |
| Container images, platforms, appliances | Docker · OCIPlattform-ImagesAppliances | – | Check noteDjango is contained in application images, not in the official Python base images: rebuild images with an updated lock file. Products with built-in Django, such as geospatial data platforms, need an update from their vendor. [1] |
What counts is the Django version your application actually loads. Distributions often build fixes into older version numbers, container images only receive the fix with the next build, and long-running workers need a restart.
Paths to the raster field
These are the paths by which an untrusted value reaches the RasterField. The Django update closes the file-write path, but you should still review your own forms and serializers.
- Django admin
A model with a RasterField registered in the admin shows the field as a text field without any further configuration. Anyone allowed to add or change the model can enter a raster definition. After the update, the field is not editable by default and no longer appears in the form. [1][8]
- Custom ModelForms
ModelForms with fields = "__all__" or a field list that includes the raster field accept the value as text. According to the researcher, the file is already created in form.is_valid(), regardless of whether the record is saved afterwards. [1][13]
- Django REST Framework and other serializers
Django explicitly names writable model serializers as a path. In Django REST Framework, model fields with editable=False are read-only in ModelSerializers by default; after the update, this defuses the default case. Explicitly declared, writable fields remain a risk. [1][37]
- CMSs, geospatial platforms and packages
The researcher lists Wagtail, Django CMS, Mezzanine, django-tastypie and Django REST Framework as widely used Django software. There is no evidence that these products ship RasterField themselves; they are affected if a project builds in a raster field. You should specifically check platforms that use GeoDjango. [13][1]
As of December 2, 2026, 4 p.m. CET. The commands below show whether a project uses RasterField and where it is reachable.
Not affected
- Django 6.1.4, 6.0.11, 5.2.20 or later, once all workers have been restarted and images rebuilt
- Projects without django.contrib.gis or without RasterField, for example with geometry fields such as PointField only
- Projects in which neither the admin nor a form nor a serializer accepts the raster field as writable
Not affected does not mean permanently safe: even after the fix, a RasterField that accepts untrusted values can make GDAL send network requests. If you accept rasters via forms, you need your own checks, for example accepting only uploads in known formats instead of free-form definitions.
Find the Django version (Linux)
Shows the Django version of the active environment, lists all installed Django copies in virtual environments and site-packages without executing code, and finds pinned versions in dependency files.
# Django in the active environment
python -m django --version 2>/dev/null || pip show django 2>/dev/null | grep -i '^version'
# Every installed Django copy (virtualenvs, system site-packages)
# prints directory names only, nothing is imported or executed
find / \( -path /proc -o -path /sys -o -path /dev \) -prune -o \
-type d \( -iname 'django-*.dist-info' -o -iname 'django-*.egg-info' \) -print 2>/dev/null
# Pinned versions in your repositories (run in the repository root)
grep -rniE --include='requirements*.txt' --include='constraints*.txt' '^django\s*([=<>~!]|$)' .
grep -rni -A1 --include='poetry.lock' --include='uv.lock' '^name = "django"$' .Check containers and images
Queries the Django version in running containers and checks an image before rollout without starting the application. Check containers without a shell with an image scanner.
# Django version inside running containers
for c in $(docker ps -q); do
echo "== $(docker inspect -f '{{.Config.Image}}' "$c")"
docker exec "$c" sh -c 'python3 -c "import django; print(django.get_version())" 2>/dev/null ||
python -c "import django; print(django.get_version())" 2>/dev/null || echo " no Django in default Python"' \
2>/dev/null || echo " no shell in container: scan the image instead"
done
# Check an image before rollout without starting the application
IMAGE=registry.example.com/app:latest # adjust
docker run --rm --entrypoint sh "$IMAGE" -c \
'python3 -c "import django; print(django.get_version())" 2>/dev/null || pip show django 2>/dev/null | grep -i ^version'Find raster fields in the project
Lists all models with a RasterField along with their editable value and admin registration. The script does not check custom AdminSites; the text search below it finds forms, admin classes and serializers that name the field or __all__.
# Run inside the project: python manage.py shell < find_rasterfields.py
from django.apps import apps
from django.contrib import admin
from django.contrib.gis.db.models import RasterField
for model in apps.get_models():
for field in model._meta.get_fields():
if isinstance(field, RasterField):
print(
f"{model._meta.label}.{field.name}",
f"editable={field.editable}",
f"admin={'yes' if admin.site.is_registered(model) else 'no'}",
)
# Static search: forms, admin classes and serializers that list the field
# grep -rn --include='*.py' -e 'RasterField' -e 'GDALRaster' -e '__all__' .Stopgap until the update
Removes the raster field from the admin and forms until the update; in serializers, set it to read-only or leave it out. GDAL_SKIP disables individual drivers in the worker’s environment, but never covers all file-based drivers and does not replace the update. Afterwards, restart workers once you have searched for traces.
# admin.py: keep the raster field out of the admin form until you have updated
@admin.register(Elevation)
class ElevationAdmin(admin.ModelAdmin):
exclude = ("rast",) # or: readonly_fields = ("rast",)
# forms.py: no "__all__" on models with a RasterField
class ElevationForm(forms.ModelForm):
class Meta:
model = Elevation
exclude = ("rast",)
# Worker environment, defense in depth (GDAL documentation): skip file drivers you do not use.
# A skip list never covers every file driver and does not replace the Django update.
# export GDAL_SKIP="EHdr ENVI"How well prepared are you for Django4Shell?
Eight questions, answered honestly. “Yes” is always the safe answer. The evaluation stays in your browser.
0 of 8 questions answered
The self-check is no substitute for an assessment of your environment.
What to do now
Three stages: today, check for traces, update and lock down reachable raster fields; this week, harden; after that, secure the acceptance of geospatial data as a matter of principle. The order matters: search first, then restart, because a crafted file runs on restart. [1][2][7][21][39][40]
Check and update
- List projects with django.contrib.gis and RasterField, starting with those whose admin or forms are reachable from the internet.
- Before every restart, use the queries below to search for unexpected sitecustomize.py, usercustomize.py and .pth files.
- Update to Django 6.1.4, 6.0.11 or 5.2.20, rebuild lock files and images and restart all workers.
- Where the update is not possible today: remove RasterField from the admin, ModelForms and serializers via exclude or readonly_fields and temporarily restrict staff access.
- Clear caches after the update, because the same release fixes a cache poisoning flaw (CVE-2026-125673).
Harden
- Review staff accounts: eliminate shared accounts, enforce MFA, disable unused accounts and limit permissions on models with a raster field.
- Make the admin reachable only from trusted networks or via VPN.
- Mount code and package directories read-only, for example as a read-only file system in the container.
- Disable GDAL drivers you do not need and block GDAL network access where it is not required.
- Adapt projects that deliberately accept rasters via forms to the new behavior: wrap only trusted values in GDALRaster and validate all others yourself.
Secure for the long term
- Keep Django projects and their versions in your inventory and SBOM, including applications from service providers.
- Replace lines without security updates, including older Django packages from Debian and Ubuntu.
- Extend pentests and code reviews to automatically generated forms: the admin, ModelForms with __all__, serializers.
- Set patch deadlines for frameworks and build Django’s monthly security releases into your schedule.
- Record lessons learned and practice the emergency process for flaws in frameworks.
For development, operations and the SOC
- Report the update status daily, projects whose admin or forms are reachable from the internet first.
- Monitor file writes by Python workers in code and package directories centrally.
- Analyze the admin log and web server logs for models with a raster field from October 22 onward.
For executive management and the information security officer
- Make projects with RasterField a priority and follow up on progress.
- Document residual risks where lines without security updates or distribution packages are still running.
- Clarify whether a suspected incident is reportable under NIS2, DORA or the GDPR and, as a manufacturer, review your obligations under the Cyber Resilience Act.
Do not restart workers as long as it is unclear whether a crafted file is on the Python search path. Isolate the system, preserve the file system and logs, and secure suspicious sitecustomize.py, usercustomize.py and .pth files. Then rotate the SECRET_KEY, database passwords and API keys known to the process, and review staff accounts. Our CSIRT supports you around the clock.
Learn moreCelebrity Zero Days: assessing zero-day vulnerabilities in the first hour
Hunting for traces
No attacks are known, but the attack chain has been publicly described since December 2, and the flaw was reported as early as October 22. Search back to at least that date and repeat the search. The strongest signal: a Python web process creates a .py or .pth file, which normally never happens in production. Advanced hunting in Defender XDR only goes back 30 days by default; for the period from October 22 onward, you need Microsoft Sentinel or another long-term archive. The queries are examples; test them in your environment before use. [43][44][40][45][21]
Python worker writes startup files
Finds sitecustomize.py, usercustomize.py, .pth and .hdr files in Defender XDR, as well as new .py files in site-packages, created by a Python process or an application server. Package installations via pip also trigger the query; exclude deployment jobs.
// Advanced hunting covers the last 30 days; use Microsoft Sentinel or another archive for the period since 22 October
DeviceFileEvents
| where Timestamp > ago(30d)
| where ActionType in ("FileCreated", "FileModified", "FileRenamed")
| where InitiatingProcessFileName startswith "python"
or InitiatingProcessFileName in~ ("gunicorn", "uwsgi", "daphne", "uvicorn", "hypercorn")
| where FileName in~ ("sitecustomize.py", "usercustomize.py")
or FileName endswith ".pth" or FileName endswith ".hdr"
or (FileName endswith ".py" and FolderPath has "site-packages")
| project Timestamp, DeviceName, ActionType, FolderPath, FileName,
InitiatingProcessFileName, InitiatingProcessCommandLine, InitiatingProcessAccountNameRuntime rule for hosts and containers
The Falco rule triggers as soon as Gunicorn, uWSGI, an ASGI server or a Python process writes a startup file, a .pth file or a new .py file in site-packages, on servers as well as in Kubernetes. It uses the open_write macro from the Falco default rules.
- rule: Python web worker writes startup or code file
desc: >
Django workers should not create .py or .pth files at runtime; typical for
Django4Shell-style file writes such as sitecustomize.py. Exclude deploy and pip jobs.
Needs the open_write macro from the default Falco rules.
condition: >
open_write
and (proc.name in (gunicorn, uwsgi, daphne, uvicorn, hypercorn) or proc.name startswith python)
and (fd.name endswith "sitecustomize.py" or fd.name endswith "usercustomize.py"
or fd.name endswith ".pth" or fd.name endswith ".hdr"
or (fd.name endswith ".py" and fd.name contains "site-packages"))
output: >
Python worker wrote a startup-capable file (user=%user.name proc=%proc.name
file=%fd.name cmd=%proc.cmdline container=%container.id)
priority: CRITICAL
tags: [host, container, filesystem, mitre_persistence]Quick check on the server
Shows the directories that Python reads at startup and searches them, as well as the project directory, for startup files, .pth files and raster header files changed since October 22. Legitimate .pth files do exist, so check every hit before the next restart.
# Directories Python reads at start-up (run with the interpreter of your workers)
python3 -c 'import sys; print("\n".join(p for p in sys.path if p))'
# Startup files, .pth files and raw raster headers changed since the report date
APP_DIR=/srv/app # adjust: project directory and working directory of the workers
find "$APP_DIR" /usr/lib/python3* /usr/local/lib/python3* /opt /srv \
\( -name 'sitecustomize.py' -o -name 'usercustomize.py' -o -name '*.pth' -o -name '*.hdr' \) \
-newermt '2026-10-22' -print 2>/dev/null
# Inspect every hit BEFORE restarting workers: legitimate .pth files contain paths
# or import lines of packages you installed yourselfAnalyze the admin log
Lists changes in the admin log to models with a raster field since October 22. The log only records successful saves; an attempt in which only validation ran leaves no trace there. Cross-check against the web server logs: POST requests to the add and change pages of these models that end with status 200 instead of a redirect indicate a rejected form.
# Admin log entries for models with a RasterField since the report date
import datetime
from django.apps import apps
from django.contrib.admin.models import LogEntry
from django.contrib.contenttypes.models import ContentType
from django.contrib.gis.db.models import RasterField
since = datetime.datetime(2026, 10, 22, tzinfo=datetime.timezone.utc)
raster_models = [m for m in apps.get_models()
if any(isinstance(f, RasterField) for f in m._meta.get_fields())]
cts = ContentType.objects.get_for_models(*raster_models).values()
for e in LogEntry.objects.filter(content_type__in=cts, action_time__gte=since).order_by("action_time"):
print(e.action_time, e.user, e.get_action_flag_display(), e.content_type, e.object_repr)Hits are indications, not proof, and their absence does not prove that nothing has happened. If you find something, treat the system as compromised until proven otherwise.
What regulation says about it
The flaw itself is not a reportable incident. What attackers do with it can become reportable, and manufacturers have obligations of their own.
- Handling vulnerabilities is mandatory
NIS2 requires essential and important entities to have risk management in place that includes vulnerability handling. Anyone who knows that a project with a RasterField in the admin is running on a vulnerable Django version and does not act may have to justify it; lines without security updates belong in risk treatment.
- Reporting deadlines in an emergency
If an attack leads to a significant security incident, the following applies in Germany: early warning to the BSI within 24 hours, notification within 72 hours, final report no later than one month after the notification. If personal data is affected, such as customer data in the application’s database, the 72-hour notification under the GDPR also applies.
- Manufacturers: Cyber Resilience Act
Since September 11, 2026, manufacturers have had to submit an early warning within 24 hours if a vulnerability in one of their own products with digital elements is actively exploited, even if it lies in a bundled framework such as Django, for example in geospatial software or appliances with a web interface. The obligations to handle vulnerabilities and provide updates apply from December 11, 2027.
- Financial sector: DORA
Financial entities assess ICT incidents under DORA and report major ones to their supervisory authority. Service providers that develop or operate Django applications for them are part of ICT third-party risk management.
Learn moreImplementing NIS2 with VamiSec CRA reporting obligations for manufacturers Implementing DORA with VamiSec
Find, secure, prove
From a short-notice exposure check to forms and APIs that accept only what they should.
CSIRT and Compromise Assessment
If you suspect an incident, we determine whether files have been written via a raster field: file system, Python search paths, admin log, credentials and network traffic.
Compromise AssessmentTest the admin, forms and APIs
Within an authorized scope, VamiRedteam checks which Django admins, forms and APIs are reachable from the outside and which fields they unintentionally make writable.
VamiRedteamSecure coding and code review
We review models, forms and serializers for automatically writable fields and train teams in handling framework defaults securely.
Secure CodingCloud workloads with Wiz
As a member of the Wiz Partner Alliance, we help Wiz customers find and prioritize vulnerable Django packages in VMs and containers.
VamiSec and WizManaged Detection & Response
We monitor servers and containers for file writes and process starts by Python workers, and respond around the clock.
MDR at VamiSecZero-day monitoring
We promptly match newly disclosed flaws such as Django4Shell against your attack surface, so that you can act before regular patch cycles take effect.
Zero-day monitoring
Agentic GRC platformVamiGRC: match vulnerabilities against assets, manage deadlines, maintain evidence
VamiGRC matches CISA KEV, NVD and EPSS against your assets, products and SBOMs. When a flaw such as CVE-2026-124827 appears, you see which of your recorded assets are affected and manage actions and deadlines through to evidence.
- CISA KEV, NVD and EPSS are matched against your assets, products and SBOMs.
- Evidence from connected systems is updated along with its source rather than at audit time.
- When an incident is recorded, a deadline timer starts for NIS2; VamiAI drafts notifications, and your team reviews and submits them.
- One control, multiple frameworks: implemented once, mapped to NIS2, ISO 27001 and other standards.
- AI agents handle the routine work according to your approval rules; your team decides.

Let’s talk about your Django applications
Whether it is an exposure check, hardening your admin and forms or evidence for NIS2 and the CRA, Valeri Milke and the VamiSec team help you derive concrete next steps from this briefing.
“IT security and compliance without AI is a vulnerability.”
Frequently asked questions about Django4Shell
What is Django4Shell?
Django4Shell is the name researcher Mohammed Fathy of Robusta Technology Group has given to CVE-2026-124827, a flaw in GeoDjango, Django’s geospatial extension. If a crafted raster definition with its own file name and a file-based driver is assigned to a RasterField, GDAL writes a file to a location chosen by the attacker; depending on the driver, this can lead to code execution. The flaw is fixed in Django 6.1.4, 6.0.11 and 5.2.20 of December 2, 2026.
Am I affected?
Projects are affected if they run Django 6.1 before 6.1.4, 6.0 before 6.0.11 or 5.2 before 5.2.20, use GeoDjango with RasterField and accept the field via the admin, a ModelForm or a writable serializer. You can check your version with the Django check on this page, and your raster fields with the script in the “Affected systems” section.
Which versions contain the fix?
Django 6.1.4, 6.0.11 and 5.2.20 of December 2, 2026, as well as the main branch as of commit a3934abd. The 5.1, 5.0 and 4.2 lines no longer receive fixes; Django has not assessed them for this flaw. Distribution packages from Debian, Ubuntu, Red Hat and SUSE were not yet available on December 2.
Does the flaw affect every Django project?
No. Only projects with django.contrib.gis and a model with a RasterField are affected, and RasterField only exists with PostGIS. Geometry fields such as PointField or PolygonField are not affected. Everyone should still apply the update, because the same release fixes six other flaws, including an SQL injection rated “high”.
What is a RasterField?
RasterField is a GeoDjango model field that stores raster data such as elevation models or satellite images in PostGIS. Django passes assigned values on to GDALRaster, an interface to the geospatial library GDAL. GDAL can keep rasters in memory or write them to disk with drivers for file formats, and this very difference is at the core of the flaw.
Do attackers need an account?
They need access to a form that accepts the raster field. In the researcher’s scenario, this is a staff account in the Django admin with permission to add or change the model; the CVSS vector assumes low privileges. If a project offers a ModelForm or serializer with the field publicly, no login is required.
I updated in October. Am I protected?
No. Versions 6.1.2, 6.0.9 and 5.2.18 from October protect database queries, but not assignment to RasterField. The November versions 6.1.3, 6.0.10 and 5.2.19 are also affected. Only 6.1.4, 6.0.11 and 5.2.20 contain the fix.
How does a file turn into code?
At startup, Python automatically reads certain files: a sitecustomize.py on the search path and .pth files in site-packages, which may contain import lines. The researcher writes a sitecustomize.py; it runs with the privileges of the process the next time a worker, a deployment or a manage.py command starts. That is why the rule is: search for such files before restarting.
Is Django4Shell already being exploited?
As of December 2, 4 p.m. CET, no attacks are known, the flaw is not in CISA’s KEV catalog, and we did not find a standalone PoC repository on GitHub. However, the researcher describes the attack chain step by step with an abridged example request. VamiSec assessment: the barrier to reproducing it is low; update projects with a RasterField in the admin or in forms immediately.
Why do some media outlets cite CVSS 9.0?
The score comes from a report by The Hacker News, which does not name a source for it; other sites have adopted it. So far, only the Django project as CNA has assigned official scores: CVSS 3.1 8.8 and CVSS 4.0 8.7, and the severity “high” under its own policy. The NVD has not yet assigned its own score, and the researcher gives “Critical / P1” without a CVSS score.
Is there a workaround?
The update takes priority. As a stopgap, remove RasterField from the admin and ModelForms via exclude or readonly_fields, set it to read-only in serializers, restrict staff access and mount code and package directories read-only. Disabling individual GDAL drivers via GDAL_SKIP reduces the risk but never covers all file-based drivers.
What does the update change in my code?
RasterField now has editable=False by default and is therefore missing from ModelForms and the admin unless you include it explicitly. If a dict or JSON string with a driver other than MEM is assigned, Django raises a GDALException. If you need other drivers, wrap the value in GDALRaster and thereby declare it trustworthy. According to Django, network requests via GDAL remain possible, so your own checks are still needed.
What about Debian, Ubuntu and other distributions?
At around 4 p.m. CET on December 2, Debian, Ubuntu, Red Hat, SUSE, Alpine and FreeBSD still had no entry for CVE-2026-124827. Debian bookworm and trixie ship the no longer maintained lines 3.2 and 4.2; Debian has not backported the fixes for the predecessor flaws there. Regarding the predecessor, Red Hat stated that its products containing Django do not use GeoDjango. If you use Django from distribution packages, check your vendor’s tracker or switch to a maintained line from PyPI.
How does VamiSec support you?
At short notice, we check which projects expose RasterField as writable, search for traces, roll out updates and image rebuilds with you, harden the admin, forms and accounts and investigate suspected cases with a compromise assessment and our CSIRT. With VamiGRC, you manage vulnerabilities, deadlines and evidence for NIS2 and the CRA.
Sources and further information
The information is based on publications by the Django project, the CVE record, the researcher’s website and the documentation of Django, GDAL and Python, as well as on distributions and trade media up to December 2, 2026, 4 p.m. CET. Assessments by VamiSec are identified as such.
- [1]Django Software Foundation (Jacob Walls): Django security releases issued: 6.1.4, 6.0.11, and 5.2.20,
- [2]Django Documentation: Django 6.1.4 release notes,
- [3]Django Documentation: Django 6.0.11 release notes,
- [4]Django Documentation: Django 5.2.20 release notes,
- [5]CVE Program: CVE Record CVE-2026-124827: Server-side file-write via RasterField assignment,
- [6]NIST National Vulnerability Database: CVE-2026-124827 Detail,
- [7]Django Documentation: GDAL API: Security considerations (raster data),
- [8]Django Documentation: GeoDjango Model API: RasterField,
- [9]Django (GitHub): Commit a3934ab: Fixed CVE-2026-124827 – Rejected non-default drivers when assigning data definitions to RasterField (main),
- [10]Django (GitHub): Commit b70d098 (stable/6.1.x),
- [11]Django (GitHub): Commit 6b5d29e (stable/6.0.x),
- [12]Django (GitHub): Commit 02d0944 (stable/5.2.x),
- [13]Robusta Technology Group (Mohammed Fathy): Django4Shell – Critical RCE in Django 6.1.2 GeoDjango RasterField,
- [14]Django Software Foundation (Natalia Bidart): Django security releases issued: 6.0.8 and 5.2.17,
- [15]Django Software Foundation (Sarah Boyce): Django security releases issued: 6.1.2, 6.0.9, and 5.2.18,
- [16]CVE Program: CVE Record CVE-2026-15307: Server-side file-write and request forgery via spatial lookups,
- [17]CVE Program: CVE Record CVE-2026-87890: Potential request forgery via spatial lookup byte values,
- [18]Django Software Foundation: Download: supported versions,
- [19]The Hacker News (Ravie Lakshmanan): New Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation,
- [20]SecurityOnline (Do Son): Django4Shell (CVE-2026-124827): Django RCE Explained,
- [21]BreachNews: Django4Shell: Django Patches GeoDjango Flaw That Can Lead to Remote Code Execution,
- [22]ZeroHour: Django patches GeoDjango RasterField RCE dubbed Django4Shell,
- [23]CIRCL: Vulnerability-Lookup: CVE-2026-124827,
- [24]OSV: CVE-2026-124827,
- [25]Debian: Security Tracker: CVE-2026-124827,
- [26]Debian: Security Tracker: CVE-2026-87890,
- [27]Ubuntu CVE Tracker: CVE-2026-87890 (python-django),
- [28]Red Hat: CVE-2026-15307,
- [29]SUSE: CVE-2026-124827,
- [30]Alpine Linux: Security Tracker: CVE-2026-124827,
- [31]FreeBSD: Ports VuXML 2026,
- [32]PyPI: Django: release history,
- [33]GitHub: Advisory Database: search CVE-2026-124827,
- [34]GitHub: Repository search: CVE-2026-124827 (as of 2 Dec 2026),
- [35]CISA: Known Exploited Vulnerabilities Catalog,
- [36]BSI / CERT-Bund: Warn- und Informationsdienst: CSAF-Feed (Änderungen),
- [37]Django REST Framework: Serializers: ModelSerializer
- [38]GDAL: EHdr – ESRI .hdr Labelled
- [39]GDAL: Security considerations
- [40]Python Documentation: site – Site-specific configuration hook (sitecustomize, .pth files)
- [41]Django Documentation: Django 1.9 release notes (RasterField),
- [42]Django Documentation: Django’s security policies: severity levels
- [43]Microsoft Learn: DeviceFileEvents table in the advanced hunting schema
- [44]Falco: Supported fields for conditions and outputs
- [45]Django Documentation: The Django admin site: LogEntry objects
This briefing is no substitute for legal advice or an assessment of your environment.
Search first, then update.
Knowing which fields your forms accept makes you faster next time.
Arrange a no-obligation initial consultation: together, we will clarify your exposure, update plan and hardening.