Skip to main content
Mallory
← Back to News
open-source-dependency-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory

Django4Shell Flaw Enables GeoDjango File Writes and Potential Remote Code Execution

Vulnerability Disclosure · 44 sources · Updated 36m ago · First seen Dec 2, 2026

Django4Shell Flaw Enables GeoDjango File Writes and Potential Remote Code Execution

Django released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven security vulnerabilities, including CVE-2026-124827, dubbed Django4Shell. The GeoDjango flaw allows attackers who can submit malicious raster definitions to an exposed RasterField assignment path to write arbitrary files through GDAL and potentially execute code with web-server privileges. Django rates the issue high severity, while reporting researcher Mohamed K. Fathy considers it critical; a CVSS score of 9.0 has been reported. Exploitation requires an exposed input, a suitable GDAL driver and a writable destination; the standard Django admin attack path requires staff-level authentication. No known exploitation was reported at publication.

The vulnerability affects raster assignment through exposed admin fields, ModelForms and writable serializers, rather than the spatial-query paths covered by earlier fixes for CVE-2026-15307 and CVE-2026-87890, which addressed raster-related file writes and server-side request forgery. The new patch restricts raster drivers and makes RasterField non-editable by default, although untrusted raster assignments can still pose server-side request forgery risks. Organizations should upgrade affected deployments promptly and review application paths that accept untrusted raster data. The releases also fix six other vulnerabilities, including SQL injection, potential cross-site scripting and cache poisoning.

Why it matters

Exposed GeoDjango applications risk attacker-controlled file writes and potential web-server compromise; separately, vulnerable Django ORM queries can expose databases to SQL injection.

Django4Shell can enable source-code modification, configuration corruption, or planted Python startup files, with code execution dependent on GDAL drivers, filesystem permissions, and subsequent execution/loading. The separate SQL injection vulnerability can affect applications without GeoDjango, but requires specific query-construction patterns. These are conditional exposures, not evidence that every Django deployment is exploitable. Django advisory, execution mechanics

Public proof-of-concept details for Django4Shell are available. An earlier Upwind report stated that none were public, but subsequent reporting and the supplied researcher disclosure establish availability. No confirmed in-the-wild exploitation or named compromised organizations are established by the supplied content; absence of reporting is not proof of no exploitation. earlier report, later reporting, researcher disclosure, incident-reporting status

Industry-specific impact is not established. Government, mapping, agricultural, and environmental platforms are mentioned as common users of raster functionality, but no affected organization, sector-targeted activity, or sector-specific incident is identified. usage context

Geography-specific impact is not established. National advisories describe product exposure and update recommendations, not confirmed affected operations, geographic targeting, or jurisdiction-specific obligations. Canadian advisory, Guyana advisory

Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

13 events · Aug 2026 – Dec 2, 2026
  1. Reported Dec 2, 20261d ago

    Researcher details Django4Shell exploitation through form validation

    Fathy disclosed that crafted JSON raster definitions can trigger file creation during form validation without a database operation, potentially enabling code execution through planted Python startup files. Exploitation requires an exposed RasterField input, suitable GDAL driver support and a writable destination; the standard admin attack path also requires staff-level authentication.

    New Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation
  2. Dec 2, 20262d ago

    Django releases Django4Shell fixes and patches six other vulnerabilities

    Django released versions 6.1.4, 6.0.11 and 5.2.20, restricting raster drivers and making RasterField non-editable by default to address CVE-2026-124827. The releases also fixed six vulnerabilities involving SQL injection, potential cross-site scripting, cache poisoning, information leakage and a heap buffer overflow.

    New Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation
  3. Reported Nov 19, 202615d ago

    Django commits GeoDjango buffer-allocation fix for CVE-2026-132809

    Django commit 06768e6 corrects the GDAL OGR_G_WkbSizeEx binding to return c_size_t, preventing undersized buffer allocation for geometries larger than 4 GB on 64-bit platforms. The low-severity flaw affected OGRGeometry.wkb, hex, geos and pickling, potentially causing segmentation faults or undefined behavior.

    [6.0.x] Fixed CVE-2026-132809 -- Fixed heap buffer overflow for 4GB+ … · django/django@06768e6 · GitHub
  4. Reported Nov 18, 202616d ago

    Django commits ORM lookup SQL injection fix for CVE-2026-132092

    Django commit 1eb6104 fixes high-severity potential SQL injection in range and in lookups involving percent-containing aliases or key transforms. The patch requires exactly two range values and strictly checks SQL fragment–parameter pairing; exploitation requires excess range values or a bilateral transform for in lookups.

    Fixed CVE-2026-132092 -- Prevented SQL injection via Range and In loo… · django/django@1eb6104 · GitHub
  5. Reported Nov 11, 202623d ago

    Django commits admin pk-alias information disclosure fix for CVE-2026-119642

    Django commit 8171bbc updates ModelAdmin.lookup_allowed() to resolve the pk alias to the actual primary-key field, preventing staff users with view permission from enumerating related-model data through repeated admin lookups. The low-severity flaw affects models with OneToOneField primary keys, including those using multi-table inheritance; the patch adds regression tests.

    [5.2.x] Fixed CVE-2026-119642 -- Handled the "pk" alias in ModelAdmin… · django/django@8171bbc · GitHub
  6. Reported Nov 11, 202623d ago

    Django commits admin reverse-relation lookup fix for CVE-2026-127929

    Django commit 8b6069a tightens ModelAdmin.lookup_allowed() to reject reverse-relation lookups that could let staff users with model view permission enumerate model values through repeated query-string searches. The patch adds regression tests for the low-severity information disclosure flaw, which regressed in Django 5.0.3.

    [6.1.x] Fixed CVE-2026-127929 -- Rejected reverse relations in ModelA… · django/django@8b6069a · GitHub
  7. Nov 9, 202625d ago

    Django confirms CVE-2026-124827

    Django confirmed the reported GeoDjango RasterField vulnerability, which permits attacker-controlled file writes and potentially remote code execution.

    Django4Shell: CVE-2026-124827 GeoDjango RCE Patched
  8. Reported Oct 28, 20261mo ago

    Django commits RasterField file-write fix for CVE-2026-124827

    Django commit a3934ab restricts implicit dictionary and JSON RasterField definitions to GDAL's MEM driver and makes RasterField non-editable by default, addressing a high-severity file-write flaw that could enable remote code execution. The patch documentation warns that these protections do not prevent SSRF and that untrusted raster input still requires custom validation.

    Fixed CVE-2026-124827 -- Rejected non-default drivers when assigning … · django/django@a3934ab · GitHub
  9. Reported Oct 27, 20261mo ago

    Django commits HTML truncation XSS fix for CVE-2026-115868

    Django commit 7cf220a escapes previously unescaped text in truncatechars_html and Truncator.chars(html=True), fixing a moderate potential XSS vulnerability when certain exact-length outputs are rendered in HTML attributes. The patch adds a regression test verifying quotation-mark escaping.

    [6.1.x] Fixed CVE-2026-115868 -- Escaped text which fits exactly in T… · django/django@7cf220a · GitHub
  10. Reported Oct 26, 20261mo ago

    Django commits dot-segment cache-poisoning fix for CVE-2026-125673

    Django commit 2fa6e41 changes HttpRequest.build_absolute_uri() to preserve request-path dot segments, preventing cache-key collisions that could let unauthenticated attackers serve cached responses for unintended URLs under certain configurations. The release notes advise clearing potentially affected caches because upgrading does not invalidate existing entries.

    [6.1.x] Fixed CVE-2026-125673 -- Prevented cache poisoning via dot se… · django/django@2fa6e41 · GitHub
  11. Oct 22, 20261mo ago

    Django receives report of RasterField hardening bypass

    Django received Robusta Technology Group researcher Fathy's report of the vulnerability later tracked as CVE-2026-124827. He described it as a bypass of the October GeoDjango hardening.

    Django4Shell: CVE-2026-124827 GeoDjango RCE Patched
  12. Oct 2026

    Django patches related GeoDjango SSRF flaw CVE-2026-87890

    Django addressed a server-side request forgery route involving attacker-controlled raw bytes in spatial lookups. The hardening required byte-based raster values to be wrapped in GDALRaster but did not protect the RasterField assignment path.

    New Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation
  13. Aug 2026

    Django patches GeoDjango raster parsing flaw CVE-2026-15307

    Django addressed a spatial-lookup vulnerability involving raster values passed to GDALRaster that could cause server-side file writes or network requests. The fix left model-field assignments accepting the affected input types.

    New Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation
Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Vulnerabilities

1 linked

Affected products

1 linked
Django
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.