As reported by The Hacker News, Django maintainers have released versions 6.1.4, 6.0.11, and 5.2.20 to address seven vulnerabilities — including a critical RCE flaw dubbed Django4Shell (CVE-2026-124827, CVSS 9.0). What makes this advisory particularly noteworthy is that this is the third iteration of the same underlying attack surface in GeoDjango's raster handling, following CVE-2026-15307 and CVE-2026-87890. Two consecutive incomplete patches should give every Django security team pause.

Security Impact: As reported by The Hacker News, Django maintainers have released versions 6.1.4, 6.0.11, and 5.2.20 to address seven vulnerabilities — including a critical RCE flaw dubbed Django4Shell (CVE-2026-124827, CVSS 9.0).

Vulnerability Summary

CVECVSSSeverityDescriptionPatch Status
CVE-2026-1248279.0CriticalArbitrary file write → RCE via RasterField assignment with user-controlled name parameterPatched in 6.1.4, 6.0.11, 5.2.20
CVE-2026-87890—HighSSRF via crafted GDAL VRT payloads referencing external raster sourcesPatched (October 2026)
CVE-2026-15307—HighServer-side file writes via spatial lookup raster parsingPatched (August 2026)

Affected products: Django framework, specifically the django.contrib.gis module (GeoDjango). Any version below 6.1.4, 6.0.11, or 5.2.20 that uses RasterField or accepts raster input through spatial lookups is potentially vulnerable.

Active exploitation: No confirmed in-the-wild exploitation reported at time of disclosure, but the public codename and detailed technical writeup significantly raise the probability of PoC development and attempted exploitation within days.

Why This Pattern Should Worry Defenders

The three-vulnerability chain reveals a systemic blind spot in how GeoDjango handles untrusted raster data. CVE-2026-15307 addressed file writes through spatial lookup parsing. CVE-2026-87890 closed the SSRF vector via GDAL VRT payloads. Yet neither fix extended protections to the RasterField assignment path — a separate code route that accepts JSON raster definitions with a user-controlled name parameter. The attacker controls the target path, file content, and filename, enabling overwrites of application source code, web shell drops into static directories, or — most critically — planting sitecustomize.py in the worker's working directory.

The sitecustomize.py technique is especially insidious: Python automatically imports this file at interpreter startup, meaning the payload executes before any application code runs — on the next gunicorn worker fork, runserver reload, or manage.py invocation.

This is a post-compromise persistence dream for attackers. No database interaction, no model.save() call required. The file write primitive alone is sufficient for full RCE with web server OS user privileges.

Who Is at Risk

Why This Pattern Should Worry Defenders
GIS-heavy applications: Platforms handling geospatial data, mapping services, real estate, agriculture tech, or government mapping portals using GeoDjango RasterField.
Any Django app importing django.contrib.gis that accepts user-uploaded raster files or processes external geospatial data feeds.
Containerized Django deployments where the web worker has write access to application directories — a misconfiguration more common than assumed.
CI/CD pipelines running manage.py commands that could trigger sitecustomize.py payloads in development or staging environments.

Shield53 Recommendations

Immediate Actions

  • Patch now: Upgrade to Django 6.1.4, 6.0.11, or 5.2.20 depending on your branch. This is non-negotiable for any application using GeoDjango.
  • Audit exposed endpoints: Search your codebase for any view, form, or API endpoint that passes user-controlled data to spatial lookups or RasterField assignments. Grep for GDALRaster, RasterField, django.contrib.gis, and raster in form/formset definitions.
  • Enforce input validation: Ensure all raster input is wrapped in GDALRaster before use in spatial lookups. Reject byte input that is not a valid hexadecimal geometry.
  • Filesystem hardening: Ensure the Django web worker runs with a least-privilege OS account that cannot write to application directories, site-packages, or the current working directory. This is your containment layer if patching is delayed.
  • Detection rules: Monitor for unexpected file creation events in Django working directories — specifically sitecustomize.py, .pth files in site-packages, and new files in static/media directories. Deploy filesystem integrity monitoring (e.g., AIDE, osquery) if not already in place.
  • Container immutability: In production, mount application code as read-only. This neutralizes the file-write-to-RCE chain entirely regardless of framework-level vulnerabilities.

Broader Lesson

Three patches for the same attack surface in four months signals that the root cause — accepting complex, attacker-influenced binary format definitions through multiple unvalidated code paths — has not been architecturally addressed. Organizations should treat GeoDjango raster input handling as inherently dangerous until Django's maintainers implement a unified validation layer across all entry points. Until then, defense-in-depth through filesystem permissions and read-only mounts is your best compensating control.