Django released versions 6.1.4, 6.0.11, and 5.2.20 on December 2, 2026, fixing seven security bugs. One of them, Django4Shell (CVE-2026-124827), lets an authenticated attacker write files to GeoDjango servers, and proof-of-concept details are already public.
Key Takeaways
- Django4Shell scores 8.8 on the CVSS scale, according to SecurityWeek, and turns GeoDjango’s RasterField into a file-write path.
- Django4Shell traces back to two earlier patches, and Orca Security says their protections didn’t extend to the RasterField assignment path.
- Django’s advisory says server-side request forgery is still possible when untrusted input reaches RasterField, even after this release.
- CVE-2026-132092, the release’s other high-severity bug, allowed SQL injection through Django’s range and in lookups.
Django4Shell was reachable through the admin by default
The bug lives in GeoDjango’s RasterField, which Django implements only on PostGIS. Feed it a raster definition with a user-controlled name parameter and a non-default driver, and GDAL could write a file to an attacker-controlled location. The Django security advisory warns that, depending on the raster driver, this could enable remote code execution.
Exposure didn’t take unusual code. RasterField reuses the CharField form field, so “the flaw was reachable by default on models with RasterField registered in the admin,” the advisory said. ModelForms and writable model serializers opened the same door.
🚨 A Django vulnerability dubbed Django4Shell can allow arbitrary file writes and potentially lead to remote code execution; CVE-2026-124827 PoC: https://t.co/EPYD3tD6O4 The flaw affects GeoDjango’s RasterField assignment functionality, allowing attacker-controlled raster data to trigger unauthorized file writes on the underlying server. Depending on the raster driver and application configuration, this can lead to remote code execution. Django | Arbitrary File Write / Remote Code Execution: • CVSS: 8.8 High (v3.1) • Attack: Remote, low privileges required • Affected: Django 5.2 < 5.2.20, 6.0 < 6.0.11, and 6.1 < 6.1.4 • Fixed: Django 5.2.20, 6.0.11, and 6.1.4 • Impact: Arbitrary file writes and potential RCE • CWE: CWE-73 External Control of File Name or Path The repository includes a Python PoC, Nmap NSE script, Nuclei template, and Docker-based testing environment. The vulnerability follows incomplete fixes for CVE-2026-15307 and CVE-2026-87890.
— Dark Web Informer (@DarkWebInformer) December 2, 2026
Orca Security said attackers could trigger the bug with a crafted JSON raster body. Its list of outcomes runs long: Python files dropped into the working directory, writes to site-packages, overwritten source code, web shells, and corrupted configuration files.
Django’s fix changes the field’s defaults. RasterField now ships with editable set to False, so ModelForms skip it unless a developer adds it explicitly. Assigning a dict or JSON string that names a non-default driver now raises GDALException. Teams that need other drivers must wrap the definition in GDALRaster, which marks the value as trusted.
The block has limits. Django says the new exception only restricts server-side file writes, and SSRF remains possible whenever untrusted input is assigned to RasterField. Geometry fields weren’t affected.
History explains the caution. Django4Shell traces back to an incomplete fix for CVE-2026-87890, a server-side request forgery (SSRF) bug patched in October. That flaw came from an incomplete fix for CVE-2026-15307, a file-write and request forgery bug patched in August. Orca described the assignment path as “a persistent and recurring attack surface.“
That record points to a component Django keeps patching one path at a time. Django’s instruction to validate untrusted input before accepting it moves part of the remaining risk onto application developers.
SQL injection and cache poisoning round out the release
Exploiting CVE-2026-132092 required aliases or key transforms containing percent signs. The range variant also needed more than two right-hand side values, while the in variant needed a bilateral transform. Django now requires exactly two values for range.
The remaining five fixes rate moderate or low. A cross-site scripting bug in the truncatechars_html filter (CVE-2026-115868) is the moderate one. The low-rated group covers cache poisoning through dot segments in request paths (CVE-2026-125673). It also includes a heap buffer overflow in OGRGeometry.wkb for geometries over 4GB on 64-bit platforms (CVE-2026-132809).
Two admin changelist leaks complete the batch (CVE-2026-119642 and CVE-2026-127929). Both let staff users with view permissions enumerate model data through repeated querystring lookups. OpenAI reported the second one, a regression the advisory dates to Django 5.0.3.
Patched teams still need to clear caches
Patches landed on Django’s main, 6.1, 6.0, and 5.2 branches, and the team urged all users to upgrade as soon as possible. Affected teams have four jobs:
- Upgrade each project to its branch’s patched release.
- Clear any potentially affected caches, because the upgrade doesn’t invalidate responses already cached under the dot-segment bug.
- Use reachability analysis for CVEs to find models exposing RasterField through the admin, ModelForms, or writable model serializers.
- Add input validation ahead of any RasterField assignment, following Django’s raster security considerations.
Django’s advisory doesn’t say how many deployments expose RasterField, or whether anyone has used Django4Shell in an attack. The request forgery warning still stands after the upgrade, so input validation is the step that outlasts the patch.



















































