Django 6.1.4, 6.0.11 and 5.2.20 fix Django4shell RCE (CVE-2026-124827) in GeoDjango RasterField, plus six other flaws
Django maintainers released versions 6.1.4, 6.0.11 and 5.2.20 on December 2, 2026 to fix seven vulnerabilities (securityonline.info). The most serious is CVE-2026-124827 (CVSS 9.0), codenamed Django4shell by Mohamed K. Fathy of Robusta Technology Group. It is an incomplete fix for CVE-2026-87890, which was itself an incomplete fix for CVE-2026-15307, so the same GeoDjango raster code path has now been patched three times. The article reports no exploitation in the wild, and securityonline.info says Django confirms no live attacks and no public weaponized exploit. Exploitation needs staff-level authentication, which limits the real risk, though the remaining conditions are met by default on GeoDjango deployments that use RasterField. This report is based on the articles alone, because no web research was performed.
Entenda a falha
A vulnerabilidade
CVE-2026-124827 ("Django4shell") is an arbitrary file write in GeoDjango's RasterField (django.contrib.gis) that can lead to RCE. CVSS is 9.0 per securityonline.info and 8.8 per SecurityWeek; no vendor score was checked. GDAL can write a file to an attacker-chosen path when it processes an untrusted raster definition with a user-controlled name and a non-default driver (EHdr). In the standard admin the attacker needs a staff account with add or change permission on the model. A public form or API that accepts raw raster definitions could expose it without authentication (GBHackers). Whether the write becomes code execution depends on the driver and the process's filesystem permissions. Fixed in Django 6.1.4, 6.0.11 and 5.2.20; 4.2 and earlier get no fix. It is an incomplete fix for CVE-2026-87890, itself incomplete for CVE-2026-15307. The same release fixes six other CVEs: SQL injection (CVE-2026-132092), XSS (CVE-2026-115868), cache poisoning (CVE-2026-125673) and three low-severity bugs.
Como funciona
Raster data is submitted to a model with a RasterField through the admin, a ModelForm or a writable serializer. RasterField falls back to a plain text form field, so a crafted JSON raster definition is accepted as a string. During form.is_valid(), before model.save(), SpatialProxy.get passes that definition to GDALRaster(). With a non-default driver such as EHdr, GDAL writes content to disk at the path derived from the supplied name, with the web process's permissions. No PostGIS table is needed. Per the researcher, a file such as sitecustomize.py placed where Python loads it runs on the next restart, worker fork, cron job or subprocess.
Por que é vulnerável
The root cause is incomplete patching. The guard check_raster_lookup_value(), added in 6.1.2 for lookups, never runs on the RasterField assignment path during ModelForm validation, so a user-controlled name and a non-default driver reach GDAL unchecked. The text-field fallback makes that path reachable by default. Orca Security calls it a persistent, recurring attack surface because earlier protections did not extend to assignment. The fix makes RasterField editable=False by default, so it stays out of auto-generated forms unless explicitly included. It also rejects dict and JSON raster definitions that specify a non-default driver, unless the input is a trusted GDALRaster object. SSRF remains possible if untrusted input is assigned to RasterField.
Onde está
The flaw is in django.contrib.gis RasterField on the assignment path, where SpatialProxy.get calls GDALRaster() during form.is_valid(); the bypassed guard is check_raster_lookup_value(). No commit is named.
Como foi descoberta
Django's advisory credits the researcher Mohamed K. Fathy of Robusta Technology Group (spelled Mohammed Fathy by GBHackers and securityonline.info), who named it Django4shell. It came from bypassing the guard added for the earlier CVE-2026-87890. Django published the advisory and fixed releases on December 2, 2026, and also patched its main branch. The articles do not say when it was reported. GBHackers says Previdian reported no confirmed exploitation as of December 2.
PoC pública
The sources disagree. SecurityWeek says public PoC details exist. securityonline.info says Django confirms no public weaponized exploit, and GBHackers says Previdian had not independently verified a standalone PoC. These may describe different levels of detail. The researcher's write-up describes a crafted JSON raster body with a user-controlled name and the EHdr driver planting files such as sitecustomize.py. No repository is cited and no exploitation in the wild is confirmed. Prioritize patching exposed RasterField forms and endpoints anyway.
Explicação gerada por IA a partir da matéria e dos artigos, em 03/12/2026 10:15.
Detalhes técnicos
- The protections added for the earlier flaws do not cover the RasterField assignment path. Assigning a raster data definition with a user-controlled name and a non-default GDAL driver (EHdr) lets GDAL write a file to an attacker-chosen location.
- Fathy says the attacker controls the path, content and filename through a crafted JSON raster body. The researcher's example is planting sitecustomize.py in the worker's working directory, which executes on the next restart, gunicorn fork, cron job or subprocess.
- The guard check_raster_lookup_value() from 6.1.2 never runs during ModelForm validation; the file is written during form.is_valid(), before model.save(), via SpatialProxy.get calling GDALRaster(). No PostGIS table is needed (securityonline.info).
- Other abuse includes dropping webshells into static directories, planting .pth files in site-packages and overwriting application code or configuration.
- RasterField falls back to a CharField form field, so the flaw is reachable by default through the admin, ModelForms or writable serializers.
- Fathy lists four preconditions: django.contrib.gis with a RasterField model, RasterField exposed through a ModelForm or the admin, GDAL with the EHdr driver, and a writable target path.
- CVE-2026-15307 allowed file writes through spatial lookup raster parsing. CVE-2026-87890 allowed SSRF through crafted GDAL VRT payloads.
- The same releases fix an SQL injection in range and in lookups (CVE-2026-132092; securityonline.info gives it CVSS 9.8 in its header but labels it High elsewhere), XSS in truncatechars_html and Truncator.chars() (CVE-2026-115868) and cache poisoning through dot segments in build_absolute_uri() (CVE-2026-125673).
- Three further low-severity fixes: admin changelist data leaks via pk aliases and reverse links (CVE-2026-119642, CVE-2026-127929) and a heap buffer overflow in OGRGeometry.wkb for geometries over 4GB on 64-bit hosts (CVE-2026-132809) (securityonline.info).
Remediação
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20. Django 4.2 and earlier are end-of-life and receive no fixes (securityonline.info).
- Django 6.1.4 sets editable=False on RasterField by default and raises GDALException for non-default drivers unless the input is wrapped in a trusted GDALRaster. SSRF risk remains if untrusted input reaches RasterField (securityonline.info).
- Until patched, treat GeoDjango deployments that use RasterField, the standard admin and a default GDAL build as exposed.
- The October release notes for CVE-2026-87890 require raster byte values to be wrapped in GDALRaster before spatial lookups. This is a backward-incompatible change.
- After patching, clear web caches that may hold poisoned entries from CVE-2026-125673, and keep application code directories read-only for web workers (securityonline.info).
- Validate all untrusted input.
Relatos divergentes
- securityonline.info lists CVE-2026-132092 as 'Highest severity: 9.8 (Critical · CVSSv3)' yet also calls it High and says the top fix is CVE-2026-124827 (CVSS 9.0); the figures are inconsistent and no vendor score was checked.
- The article spells the researcher's name 'Mohammed Fathy'; the known report has 'Mohamed K. Fathy'.
- securityweek.com gives CVE-2026-124827 a CVSS of 8.8, whereas securityonline.info gives 9.0; no vendor score was checked.
- securityweek.com says public PoC details exist, whereas securityonline.info says there is no public weaponized exploit; the two may refer to different levels of detail.
Linha do tempo
-
Django 6.1.4, 6.0.11 and 5.2.20 fix 'Django4Shell' RCE (CVE-2026-124827) in GeoDjango RasterField
SecurityWeek gives the CVSS of CVE-2026-124827 as 8.8, whereas the known report says 9.0. It also says public PoC details exist and credits Orca Security's analysis, including the crafted JSON raster body and a non-default GDAL driver.
ler a análise desta fonte ocultar
SecurityWeek gives the CVSS of CVE-2026-124827 as 8.8, whereas the known report says 9.0. It also says public PoC details exist and credits Orca Security's analysis, including the crafted JSON raster body and a non-default GDAL driver.
Django maintainers released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven security bugs. The most serious is CVE-2026-124827 (CVSS 8.8), dubbed Django4Shell. It is an arbitrary file-write flaw in the GeoDjango RasterField that can lead to RCE, and public proof-of-concept details exist. It is an incomplete fix for CVE-2026-87890 (an SSRF patched in October), which was itself an incomplete fix for CVE-2026-15307 (patched in August). Exploitation needs an authenticated attacker. The article reports no exploitation in the wild. No web research was performed, so the details come from the article alone.
Technical Details
- Django's maintainers say that because RasterField falls back to the CharField form field, the flaw is reachable by default on models with RasterField registered in the admin, ModelForms or writable model serializers.
- Orca Security says an attacker can use a crafted JSON raster body with a user-controlled 'name' parameter and a non-default GDAL driver. This lets the attacker drop Python files into the working directory, write to site-packages, overwrite source code, deploy web shells or corrupt configuration files.
- Orca says earlier protections did not cover the RasterField assignment path. GeoDjango applications on PostGIS that define a RasterField may be vulnerable.
- The same releases fix XSS, cache poisoning, information disclosure, heap buffer overflow and SQL injection bugs.
Remediation
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20.
- Prioritize GeoDjango applications that expose RasterField through the admin, ModelForms or writable serializers.
-
Django 6.1.4, 6.0.11 and 5.2.20 fix Django4Shell RCE (CVE-2026-124827) in GeoDjango RasterField and six other flaws
The article adds the release date (December 2, 2026), the vendor's statement that no attacks are confirmed, the full list of seven CVEs including CVE-2026-119642, CVE-2026-127929 and CVE-2026-132809, the vendor's mitigation (editable=False, GDALException) and the end-of-life branch note. It also gives a 9.8 CVSS for CVE-2026-132092, which conflicts with the 'High' label it uses elsewhere.
ler a análise desta fonte ocultar
The article adds the release date (December 2, 2026), the vendor's statement that no attacks are confirmed, the full list of seven CVEs including CVE-2026-119642, CVE-2026-127929 and CVE-2026-132809, the vendor's mitigation (editable=False, GDALException) and the end-of-life branch note. It also gives a 9.8 CVSS for CVE-2026-132092, which conflicts with the 'High' label it uses elsewhere.
The Django Project released Django 6.1.4, 6.0.11 and 5.2.20 on December 2, 2026. The releases fix seven vulnerabilities. The top issue is Django4Shell (CVE-2026-124827, CVSS 9.0), an RCE path in GeoDjango's RasterField found by Mohammed Fathy of Robusta Technology Group. The article also reports a high-severity SQL injection (CVE-2026-132092). It says no exploitation in the wild is confirmed and no weaponized public exploit exists. Exploitation needs a staff user, which limits the real risk. No web research was performed, so this record rests on the article alone.
Technical Details
- The raster lookup guard added in 6.1.2 (CVE-2026-87890, check_raster_lookup_value()) never runs on the ModelForm validation path.
- RasterField falls back to a CharField in forms. A staff user can submit crafted JSON with a custom file name and a non-default driver. SpatialProxy.get passes it to GDALRaster() during form.is_valid(). GDAL's EHdr driver then writes the file as the web user, for example sitecustomize.py, which Python runs on the next worker start.
- The other fixes cover SQL injection in range and in lookups (CVE-2026-132092), XSS in truncatechars_html (CVE-2026-115868), cache poisoning in build_absolute_uri() (CVE-2026-125673), admin changelist leaks (CVE-2026-119642, CVE-2026-127929) and a heap overflow in OGRGeometry.wkb (CVE-2026-132809).
Remediation
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20. Django 4.2 and earlier receive no fixes.
- 6.1.4 sets editable=False on RasterField by default and raises GDALException for non-default drivers unless the input is wrapped in a trusted GDALRaster.
- Clear web caches after patching, validate input to RasterField, and keep application code directories read-only for web workers.
-
Django 6.1.4, 6.0.11 and 5.2.20 fix Django4shell RCE (CVE-2026-124827) in GeoDjango RasterField, plus six other flaws
ler a análise desta fonte ocultar
Django maintainers released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven vulnerabilities. The most serious is CVE-2026-124827 (CVSS 9.0), codenamed Django4shell by Mohamed K. Fathy of Robusta Technology Group. It is an incomplete fix for CVE-2026-87890, which was itself an incomplete fix for CVE-2026-15307, so the same GeoDjango raster code path has now been patched three times. The article reports no exploitation in the wild. Exploitation needs staff-level authentication, which limits the real risk, though the remaining conditions are met by default on GeoDjango deployments that use RasterField. This report is based on the article alone, because no web research was performed.
Technical Details
- The protections added for the earlier flaws do not cover the RasterField assignment path. Assigning a raster data definition with a user-controlled name and a non-default GDAL driver (EHdr) lets GDAL write a file to an attacker-chosen location.
- Fathy says the attacker controls the path, content and filename through a crafted JSON raster body. The researcher's example is planting sitecustomize.py in the worker's working directory, which executes on the next restart, gunicorn fork, cron job or subprocess.
- Other abuse includes dropping webshells into static directories, planting .pth files in site-packages and overwriting application code or configuration.
- RasterField falls back to a CharField form field, so the flaw is reachable by default through the admin, ModelForms or writable serializers.
- Fathy lists four preconditions: django.contrib.gis with a RasterField model, RasterField exposed through a ModelForm or the admin, GDAL with the EHdr driver, and a writable target path.
- CVE-2026-15307 allowed file writes through spatial lookup raster parsing. CVE-2026-87890 allowed SSRF through crafted GDAL VRT payloads.
- The same releases fix an SQL injection in range and in lookups (CVE-2026-132092), XSS in the truncatechars_html filter (CVE-2026-115868) and cache poisoning through dot segments in request paths (CVE-2026-125673).
Remediation
- Upgrade to Django 6.1.4, 6.0.11 or 5.2.20.
- Until patched, treat GeoDjango deployments that use RasterField, the standard admin and a default GDAL build as exposed.
- The October release notes for CVE-2026-87890 require raster byte values to be wrapped in GDALRaster before spatial lookups. This is a backward-incompatible change.
- Validate all untrusted input.