Skip to content
Django Fixes Seven Security Flaws, Including Critical Django4Shell RCE Vulnerability

Django Fixes Seven Security Flaws, Including Critical Django4Shell RCE Vulnerability

Thecyberexpress •Ashish Khaitan • December 3, 2026

Django has released versions 6.1.4, 6.0.11, and 5.2.20 to fix seven security flaws. The most serious Django4Shell vulnerability is CVE-2026-124827, which has been called the Django4Shell vulnerability. It could enable Django RCE.

Jacob Walls announced the releases on December 2, 2026, under the project’s release policy. “We encourage all users of Django to upgrade as soon as possible,” the team said.

How the Django4Shell Vulnerability Works

CVE-2026-124827 is rated “high” severity and affects django.contrib.gis.db.models.RasterField. If a raster definition had a user-controlled name parameter and a non-default driver, assigning it to the field could make GDAL write a file to a location the attacker chose. Depending on the driver, that could escalate to Django RCE.

RasterField falls back to the CharField form field. Because of this, the flaw was reachable by default on any model with a RasterField that was registered in the admin or used in ModelForms or writable model serializers. Geometry fields were not affected, and RasterField exists only on PostGIS. Mohammed Fathy reported the issue.

How CVE-2026-124827 Was Fixed

RasterField now defaults editable to False, so it is left out of ModelForms unless a developer adds it. Assigning a dict or JSON string that specifies a non-default driver now raises GDALException. To use other drivers, developers must wrap the definition in GDALRaster to mark it as trusted.

The fix only blocks file writes. Server-side request forgery is still possible with untrusted input, so developers should review the raster security considerations and validate input first.

Six Other Flaws Patched Alongside Django4Shell

CVE-2026-132092 (high): in range and in lookups on queries with aliases or key transforms that contain percent signs. The __range flaw needed more than two right-hand side values, and exactly two are now required. The __in flaw needed a bilateral transform. These percent signs were deprecated in Django 6.0 and are scheduled for removal in Django 2028. Reported by Cristian Panaro.

CVE-2026-115868 (moderate): Possible XSS in truncatechars_html and Truncator.chars() with html=True. It occurred when input whose text length matched the truncation length was rendered in an HTML attribute. Reported by JoeCyberTech.

CVE-2026-125673 (low): Cache poisoning in UpdateCacheMiddleware and cache_page(). build_absolute_uri() wrongly normalized “.” and “..” segments, so in some setups unauthenticated attackers could get cached responses served for unintended URLs. Dot segments are now preserved. Existing caches are not cleared automatically, so users should clear them after upgrading. Reported by 4drez.

CVE-2026-119642 (low): Staff with view permissions could enumerate data in the admin changelist through the “pk” alias on models with a custom OneToOneField primary key. Multi-table inheritance models were affected by default. Reported by JoeCyberTech.

CVE-2026-127929 (low): Similar enumeration through reverse relations, which requires knowing related model names or related_query_name overrides. The bug came back as a regression in Django 5.0.3. Reported by OpenAI.

CVE-2026-132809 (low): A heap buffer overflow in OGRGeometry.wkb for geometries over 4GB on 64-bit platforms, which could cause segmentation faults or undefined behavior. The hex and geos properties and pickling were also affected, reported by Zhixi “Jace” Sun.

Both admin flaws are special cases of CVE-2010-4534.

Patching the Django RCE Flaw and Others

Fixes for the Django4Shell and the other six bugs cover the main, 6.1, 6.0, and 5.2 branches. The releases are signed with Walls’ PGP key , ID 131403F4D16D8DC7. Security issues should be reported privately to [email protected] , not through Trac or the Django Forum.

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Django4Shell: Incomplete Fix Leads to GeoDjango RasterField File-Write and RCE Risk (CVE-2026-124827) On 2 December 2026 Django released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven vulnerabilities, the most significant being CVE-2026-124827 ("Django4shell"), reported by Mohamed K. Fathy of Robusta Technology Group. The flaw lies in GeoDjango's RasterField: assigning a raster definition with a user-controlled name parameter and a non-default GDAL driver (such as EHdr) can cause GDAL to write a file to an attacker-chosen path, which the articles say can enable remote code execution. The write occurs during form validation, so no database access is needed. Exploitation requires an authenticated staff-level account; sources note that three of the four preconditions are typically met by default in standard GeoDjango setups. The issue is the third incomplete fix for the same attack surface: CVE-2026-15307 (August 2026) and CVE-2026-87890 (October 2026) guarded spatial lookups but not the field assignment and ModelForm path. Django's advisory says RasterField now defaults to non-editable and raises GDALException for dict or JSON definitions specifying non-default drivers; it notes SSRF remains possible with untrusted input. Severity is rated High (CVSS 4.0 8.7, CVSS 3.1 8.8) by Snyk and the Django/CVE record; Fathy and some outlets describe it as 9.0 Critical, so views diverge. Snyk and Cybersecuritynews report no confirmed exploitation as of 2 December, and a public proof-of-concept appeared on 3 December per the disclosure site. The same releases fix other issues, including a High SQL injection in range and lookups (CVE-2026-132092). 17 sources 75