Skip to content
All posts

Django4shell CVE-2026-124827: GeoDjango Fix, What to Do

December 3, 2026 · Team PlayCISO
TL;DR · the short version

On 2 December 2026 Django released 6.1.4, 6.0.11 and 5.2.20 to fix seven vulnerabilities. The most discussed, CVE-2026-124827 ("Django4shell", a name from the researcher, not Django), is rated high: in GeoDjango, assigning a raster definition with a user-controlled name and a non-default driver to a RasterField could make GDAL write a file to an attacker-chosen location, which Django says could enable remote code execution depending on the driver. It needs GeoDjango with PostGIS and a RasterField that can be set through the admin, a ModelForm or a writable serializer; the CVE record scores it as needing a low-privilege login. No exploitation is reported and it is not in CISA KEV. The same release fixes a high-severity SQL injection in the range and in lookups, so every supported Django site should upgrade.

Put it into practice
Find Django in your repositories
Check a public repo or paste a lockfile (requirements, poetry, Pipfile.lock) and see the installed vs fixed versions, in your browser.
Run the dependency check

Django released 6.1.4, 6.0.11 and 5.2.20 on 2 December 2026 to fix seven vulnerabilities, the most serious of which, CVE-2026-124827, can let an attacker write a file anywhere the server allows through GeoDjango's RasterField. Django rates it high and says it "could enable remote code execution" depending on the raster driver. The researcher who reported it calls it Django4shell, according to The Hacker News. It only affects sites that use GeoDjango raster fields with PostGIS, and the CVE record scores it as needing a login. No exploitation is reported. This is a flaw in Django, not a breach of the Django project.

Who this is for: engineering and AppSec leads with Django applications, especially mapping, geospatial, logistics, agriculture, environmental and government apps that store raster data.

Based on Django's 2 December security release post, the CVE record and Django's earlier August and October security posts, read on 3 December 2026. The name, the researcher's score and his view of the history come from The Hacker News; the researcher's own site showed only a title when we checked. No exploit details here.

Confirmed vs not yet known

Django confirms (2 Dec 2026): CVE-2026-124827, severity high, fixed in 6.1.4, 6.0.11 and 5.2.20 (and main). Needs GeoDjango with PostGIS and a RasterField reachable through the admin, a ModelForm or a writable serializer. Geometry fields are not affected.

The CVE record (CNA Django Software Foundation): CVSS 3.1 8.8 and CVSS 4.0 8.7, both with low privileges required; CWE-73 (external control of file name or path). Unsupported series such as 5.1, 5.0 and 4.2 "were not evaluated and may also be affected". Credit: Mohammed Fathy.

The researcher says (via The Hacker News): the name Django4shell, a score of CVSS 9.0, staff-level login as the main requirement, and that this is an incomplete fix for CVE-2026-87890, itself an incomplete fix for CVE-2026-15307. Django's post does not describe that history.

Not yet known: no exploitation has been reported (CISA's enrichment says "none"; not in KEV as of catalog 2026.11.30). No public exploit was found by us, and none is described here.

What the flaw is

GeoDjango, Django's geographic add-on, can store raster data (gridded images such as elevation or satellite tiles) in a RasterField, using the GDAL library underneath. Per Django, assigning a raster definition with a user-controlled name and a non-default driver could make GDAL create a file at an attacker-controlled location. Writing a file where Python or the web server will later load it is how a file write becomes code execution, which is why Django says that outcome depends on the driver.

Because a RasterField falls back to a plain text form field, it shows up in the Django admin and in ModelForms unless someone excludes it. That is why Django lists the admin, ModelForms and writable serializers as the routes in.

The fix: RasterField now defaults to editable=False, and assigning a dict or JSON string with a non-default driver raises GDALException. Code that genuinely needs another driver must wrap the definition in GDALRaster to mark it as trusted. Django adds that server-side request forgery is still possible if untrusted input reaches GDAL, so validate input first.

Useful next, if this was relevant to you

Showing 1 of 3: CISO Readiness Scorecard

The rest of the 2 December release

The same release fixes six more issues, so upgrade even if you do not use GeoDjango:

  • CVE-2026-132092 (high): SQL injection in the range and in lookups when aliases or key transforms contain percent signs.
  • CVE-2026-115868 (moderate): cross-site scripting in truncatechars_html in some HTML-attribute cases.
  • CVE-2026-125673 (low): cache poisoning through dot segments; clear possibly affected caches after upgrading.
  • CVE-2026-119642 and CVE-2026-127929 (low): admin changelist data leaks to staff users with view permission.
  • CVE-2026-132809 (low): heap buffer overflow in OGRGeometry.wkb for geometries over 4 GB.

Timeline

DateEventSource
4 Aug 2026Django fixes CVE-2026-15307, server-side file write and request forgery via spatial lookups (high), in 6.0.8 and 5.2.17Django
6 Oct 2026Django fixes CVE-2026-87890, request forgery via spatial lookup byte values (moderate), in 6.1.2, 6.0.9 and 5.2.18Django
2 Dec 2026Django 6.1.4, 6.0.11 and 5.2.20 fix CVE-2026-124827 and six other flaws; CVE record publishedDjango, CVE record
2 Dec 2026The researcher's name "Django4shell" and his account of the incomplete-fix chain reportedThe Hacker News
3 Dec 2026No exploitation reported; not in CISA KEV (catalog 2026.11.30)CVE record, CISA KEV

What security leaders should do this week

  • Find every Django app and its version. Search lockfiles and images for the Django package, including internal tools and vendor products built on Django. The repo dependency exposure check reads requirements, poetry and Pipfile.lock files in your browser.
  • Upgrade to 6.1.4, 6.0.11 or 5.2.20. Anything on 5.1, 5.0, 4.2 or older gets no fix and, per the CVE record, was not evaluated: plan the move to a supported series.
  • If you use GeoDjango rasters, check the exposure now. Search code for RasterField. If one appears in an admin, a ModelForm or a writable API serializer, upgrade first; until then, remove it from forms (editable=False or exclude it) and limit who has staff access to that model.
  • Review staff accounts. The likely route needs a login. Check who has staff and model-edit rights, enforce MFA on the admin, and keep the admin off the open internet where you can.
  • Look for odd files. On exposed apps, check for unexpected new files in the project directory and on Python's import path (for example new .pth files in site-packages), since a file write there runs code on the next start.
  • Rank it. High severity, a login needed and no exploitation reported put it below the KEV items on your list. The vulnerability prioritizer helps order it.

Frequently asked questions

What is Django4shell?

Django4shell is the name the researcher Mohamed K. Fathy gave CVE-2026-124827, according to The Hacker News. Django itself calls it "Server-side file-write via RasterField assignment". In GeoDjango, a raster definition with a user-controlled name and a non-default driver could make GDAL write a file to a place the attacker chooses, which Django says could enable remote code execution depending on the driver.

Which Django versions fix CVE-2026-124827?

Django 6.1.4, 6.0.11 and 5.2.20, released on 2 December 2026. The CVE record lists 6.1 before 6.1.4, 6.0 before 6.0.11 and 5.2 before 5.2.20 as affected, and says unsupported series such as 5.1, 5.0 and 4.2 were not evaluated and may also be affected.

Am I affected by Django4shell?

Only if you use GeoDjango with PostGIS (the only backend that supports RasterField) and a RasterField can be set through the admin, a ModelForm or a writable serializer, per Django. Sites that do not use django.contrib.gis raster fields are not exposed to this one, but the same release fixes six other flaws, including a high-severity SQL injection, so upgrade anyway.

Does an attacker need to log in?

In practice, usually. The CVE record scores it with low privileges required (CVSS 3.1 8.8), and the researcher, as quoted by The Hacker News, calls staff-level authentication the primary requirement, for example a staff user who can edit the model in the Django admin. A public form or API that writes a RasterField would lower that bar.

Is Django4shell exploited?

No exploitation has been reported. CISA's enrichment of the CVE record says exploitation "none", and the CVE is not in the CISA KEV catalog as of version 2026.11.30.

What changed in the fix?

Per Django, RasterField now defaults to editable=False, so it no longer appears in forms by default, and assigning a dict or JSON string with a non-default driver raises GDALException. Code that needs other drivers must wrap the definition in GDALRaster to mark it as trusted. Django warns that server-side request forgery is still possible with untrusted input, so validate it first.

Related: Django in the Breach Index (not a breach), and other "4shell" style flaws this autumn such as Java4Shell.

Sources

Spotted an error? Report an error. A person reads every message.

Find Django in your repositories
Check a public repo or paste a lockfile (requirements, poetry, Pipfile.lock) and see the installed vs fixed versions, in your browser.
Run the dependency check
Take this with you
What the flaw is · The rest of the 2 December release · Timeline · What security leaders should do this week · Sources

Ready to practise the decisions these articles describe?

Run your first Cyber War Room free →

Pro

🎉 New here? Use code WELCOME10 for 10% off any plan at checkout