Django Patches GeoDjango Flaw Enabling Arbitrary File Writes and Potential RCE

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
T1059.006 · PythonThe article describes planting Python code in sitecustomize.py or a .pth file so it can execute when a Python process or application worker initializes.T1190 · Exploit Public-Facing ApplicationA crafted raster definition submitted through an exposed GeoDjango form, admin endpoint, or writable API can exploit the vulnerable RasterField assignment path.
CVE
CVE-2026-124827djangoproject · DjangoDjango maintainers have released security updates addressing CVE-2026-124827, a high-severity vulnerability in GeoDjango that can allow an attacker to write arbitrary files to the server and potentially achieve remoteCVE-2026-15307djangoproject · DjangoCVE-2026-15307, addressed in August 2026, involved GeoDjango spatial lookup raster parsing and could enable server-side file writes.CVE-2026-87890djangoproject · DjangoA subsequent flaw, CVE-2026-87890, involved crafted GDAL Virtual Raster payloads and could enable server-side request forgery.
People
Industries
AgricultureGovernment, mapping, agriculture, environmental monitoring, infrastructure, and other GIS-heavy environments may be more likely to expose the vulnerable functionality.Environmental monitoringGovernment, mapping, agriculture, environmental monitoring, infrastructure, and other GIS-heavy environments may be more likely to expose the vulnerable functionality.GovernmentGovernment, mapping, agriculture, environmental monitoring, infrastructure, and other GIS-heavy environments may be more likely to expose the vulnerable functionality.InfrastructureGovernment, mapping, agriculture, environmental monitoring, infrastructure, and other GIS-heavy environments may be more likely to expose the vulnerable functionality.MappingGovernment, mapping, agriculture, environmental monitoring, infrastructure, and other GIS-heavy environments may be more likely to expose the vulnerable functionality.
