1. Basic Information
- Article Title: Django security releases issued: 6.1.4, 6.0.11, and 5.2.20
- Publisher: Django Software Foundation
- Published Date: 2026-12-02
- Original Source: Django Software Foundation
- Related Sources: SecurityWeek: Django Patches 'Django4Shell' Flaw Leading to RCE, Django Software Foundation CVE Record
- Severity (Author's Priority): high
2. One-Sentence Summary
In GeoDjango's RasterField used with PostGIS, if a user can control the name and a non-default GDAL driver, files may be written to an attacker-specified location with the permissions of the application user. Depending on the driver and execution environment, this could also lead to code execution. This file-write vulnerability was fixed in Django 6.1.4, 6.0.11, and 5.2.20.
3. Attack Flow
This is the expected path based on Django's advisory.
Path 1: From User Input to File Write at an Attacker-Specified Location
- An attacker sends input containing a name and a non-default GDAL driver to a vulnerable RasterField.
- Django processes the input as a raster data definition.
- If the application user has write permissions and the driver and execution environment allow the write to proceed, the GDAL driver writes a file to the attacker-specified location.
- Depending on the driver and execution environment, this may lead to subsequent code execution.
4. Attacker Position and Execution Location
- A user who can provide input to a RasterField. Required authentication and privileges depend on the input path; if accessed via the Django admin interface, permissions to manipulate the target model are required.
5. Visibility to Victims and Administrators
Victim
- It may appear as normal form submission or administrative activity.
Administrator
- Clues include unusual driver specifications, new files created by the application user, and child processes spawned by the web process.
6. Success and Failure Conditions
Success Conditions
- Using an affected, unpatched version.
- Using RasterField with PostGIS, with the user able to access the target input path.
- The user can control the RasterField's name and a non-default driver.
- The application user has write permissions to the attacker-specified location.
Failure Conditions / Mitigations
- Update to a patched version.
- Avoid passing untrusted input directly to RasterField. Django warns that SSRF can still occur even in patched versions depending on how input is passed.
- Restrict write destinations for the application user.
7. Impact Upon Success
- File write to an attacker-specified location.
- Code execution on the application server, depending on the environment and driver.
8. Observable Logs
- endpoint_edr: If file and process events are collected, traces of file creation in unusual paths by the web process and subsequent execution.
- identity_idp: Accounts and source addresses that accessed the admin interface.
- saas_cloud: Abnormal values if the relevant parameters are logged by a WAF, load balancer, or application.
- network: Suspicious POST requests to endpoints handling RasterField.
9. Determining Attack Success
Confirmed in Public Information
Django's advisory explains the conditions and impact. No real-world exploitation attempts, file writes, or code execution have been confirmed from the advisory.
Criteria for Internal Assessment
- Exploitation Attempt Observed (Success Unconfirmed): Use this classification when you confirm requests targeting the vulnerable RasterField processing. Verify any file write and any subsequent code execution with separate evidence.
10. Investigation Playbook
- trigger: Driver specification in requests to endpoints handling RasterField, or abnormal file creation.
- initial_checks: Check the target Django version, exposure scope, authentication requirements, and whether the affected feature is used.
- endpoint: Preserve product logs, configuration change history, and web/API access logs.
- identity_cloud: Check authentication history and privilege changes for administrator and user accounts.
- follow_on: Check for suspicious files, command execution, internal reconnaissance, and data access.
- containment: Update Django to a patched version, disable vulnerable input paths, and restrict write permissions.
- classification: Separately determine reachability, vulnerability conditions met, execution, privilege acquisition, and follow-on activity.
11. Defense and Detection Ideas
- single_event: Non-default driver specification in RasterField input.
- time_series: Correlate suspicious POST requests -> abnormal file creation -> web process child processes.
- hunting: Inventory the use of GeoDjango, RasterField, Django admin interfaces, ModelForm, and serializers across your applications.
- logging_gaps: GDAL processing arguments and output destinations may not be recorded in default logs.
- priority_controls: Prioritize applying patched versions and restricting RasterField input.
12. Facts / Inference / Hypothesis
Facts
- CVE-2026-124827 is an issue where improper handling of user input in RasterField allows writing files to an attacker-specified location using a non-default GDAL driver.
- RasterField is only implemented for PostGIS. Geometry fields are not affected.
- Fixed in Django 6.1.4, 6.0.11, and 5.2.20.
- Django explained that before the fix, RasterField fell back to CharField in forms and was reachable by default through models registered in the admin interface, ModelForm, and writable model serializers.
- In the CVE record registered by Django, end-of-life branches were not evaluated and may be affected.
- The official severity based on Django's security policy is high.
Inference
- Even when using GeoDjango, configurations that do not pass user input to RasterField have a smaller direct attack surface, though an inventory of admin interface exposure and form definitions is still necessary.
Hypothesis
- None
13. MITRE ATT&CK Mapping
| ID | Technique | Confidence | Basis |
|---|---|---|---|
| T1190 | Exploit Public-Facing Application | medium | Applies when vulnerable RasterField processing is reachable from externally exposed forms or admin interfaces. |
| T1105 | Ingress Tool Transfer | low | Arbitrary file write could be used to stage follow-on payloads, but real-world exploitation is unconfirmed. |
14. Unknowns / Further Investigation
- It remains unconfirmed whether any publicly released exploit code has been used or whether the vulnerability has been exploited in the wild.
- Details of write formats by driver, default permissions, and RCE conditions depend on the environment.
15. Impact on SOCs and Organizations
Organizations using Django should prioritize checking not only whether GeoDjango is enabled, but also any forms, admin interfaces, and APIs that expose RasterField to external input, as well as the write permissions of the application user.
16. Audience-Specific Summary
- For SOCs: Correlate RasterField input, GDAL driver specifications, abnormal file creation, and subsequent execution before and after Django updates.
- For Administrators: Update to 6.1.4, 6.0.11, or 5.2.20, and reduce RasterField exposure and write permissions.
- For Users: Avoid entering suspicious input in admin interfaces or file-processing features, and limit exposure until updates are complete.
Top comments (0)