Django Patches GeoDjango Flaw Enabling Arbitrary File Writes and Potential RCE

· Original article ↗

Summary

Django patched CVE-2026-124827, a GeoDjango RasterField flaw that can enable arbitrary file writes and potentially code execution when exposed through writable interfaces. Fixed versions are 6.1.4, 6.0.11 and 5.2.20; no verified in-the-wild exploitation was reported as

Key points

  • A crafted raster definition with an attacker-controlled filename and a non-default GDAL driver can write files to locations accessible to the Django application process.
  • Exposure requires GeoDjango RasterField functionality to be reachable through a writable interface and the application process to have access to a useful filesystem location; the described default Django Admin path requires staff-level authentication.
  • An attacker could potentially turn the file-write capability into code execution by planting files such as sitecustomize.py or .pth files in Python startup locations. Execution may occur later, when a process starts or reloads.
  • Django fixed the flaw in versions 6.1.4, 6.0.11 and 5.2.20. Earlier releases in the 6.1, 6.0 and 5.2 branches are affected; unsupported older branches were not evaluated and may also be vulnerable.
  • The fix makes RasterField non-editable by default, preventing automatic exposure through generated ModelForms unless developers explicitly enable it.
  • The article reports that public proof-of-concept code appeared soon after disclosure, but its reviewed sources had found no verified real-world exploitation as of December 4, 2026.
  • Recommended measures include upgrading, reviewing writable RasterField interfaces, restricting application-worker filesystem permissions, and monitoring for unexpected file creation in Python paths and application directories.

Article Details

Vulnerability Types
  • Arbitrary server-side file write
  • Potential remote code execution
Severity
High; CVSS 3.1 score 8.8
Affected Versions
  • Django 5.2 versions before 5.2.20
  • Django 6.0 versions before 6.0.11
  • Django 6.1 versions before 6.1.4
Exploitation Status
not_reported
Exploit Availability
public_poc
Patch Status
available
Workarounds
  • Do not expose RasterField through Django Admin, ModelForms, serializers, or other writable interfaces unless required.
  • Restrict Django worker filesystem write permissions, especially for Python module paths, site-packages, and application source directories.

MITRE ATT&CK

CVE

People

Industries

Related Articles