Skip to content
Security Releases

Security Releases

www.djangoproject.com • December 2, 2026

In accordance with our security release policy , the Django team is issuing releases for Django 6.1.4 , Django 6.0.11 , and Django 5.2.20 . These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible.

CVE-2026-124827: Server-side file-write via RasterField assignment

Assigning a raster data definition to django.contrib.gis.db.models.RasterField with a user-controlled name parameter and a non-default driver could cause GDAL to write a file to an attacker-controlled location. Depending on the raster driver, this could enable remote code execution. Because RasterField falls back to the CharField form field, the flaw was reachable by default on models with RasterField registered in the admin or using ModelForm s or writable model serializers.

RasterField now defaults editable to False , excluding it from a ModelForm unless explicitly included. RasterField also now raises GDALException when assigning a dict or JSON string specifying a non-default driver. To use other drivers, wrap the definition in GDALRaster to signify the value is trusted. This exception only limits server-side file writes. Server-side request forgery is still possible if untrusted input is assigned to RasterField . See raster security considerations and implement validation before accepting untrusted input.

Geometry fields were not affected. RasterField is only implemented on PostGIS.

This issue has severity "high" according to the Django security policy .

Thanks to Mohammed Fathy for the report.

CVE-2026-115868: Potential cross-site scripting vulnerability in truncatechars_html

The truncatechars_html template filter and the django.utils.text.Truncator.chars() method (with html=True ) were subject to a potential cross-site scripting (XSS) attack when certain inputs whose text length matched the truncation length were processed and rendered in an HTML attribute.

This issue has severity "moderate" according to the Django security policy .

Thanks to JoeCyberTech for the report.

CVE-2026-125673: Potential cache poisoning via dot segments in request paths

django.middleware.cache.UpdateCacheMiddleware and django.views.decorators.cache.cache_page() were affected by a bug in django.http.HttpRequest.build_absolute_uri() , which incorrectly normalized request paths containing . or .. segments. Under certain deployment and URL configurations, this could allow an unauthenticated attacker to cause cached responses to be served for unintended URLs.

django.http.HttpRequest.build_absolute_uri() now preserves dot segments in the request path when called without a location. Existing cached responses are not invalidated, so users should clear any potentially affected caches after upgrading.

This issue has severity "low" according to the Django security policy .

Thanks to 4drez for the report.

CVE-2026-119642: Information leakage in admin changelist via "pk" alias for OneToOneField

The admin changelist allowed staff users with view permissions on a registered model with a custom django.db.models.OneToOneField primary key to enumerate data from those models by including the pk alias in the querystring and performing repeated lookup searches. This requires sufficient knowledge of the fields on the related model. It is a special case of CVE-2010-4534.

Models using multi-table inheritance were affected by default, as the implicit primary key field created by Django is a OneToOneField .

This issue has severity "low" according to the Django security policy .

Thanks to JoeCyberTech for the report.

CVE-2026-127929: Information leakage in admin changelist via reverse relations

The admin changelist allowed staff users with view permissions on a registered model to enumerate values on those models via manipulating the querystring to perform repeated lookup searches. This requires knowledge of the related model names or django.db.models.ForeignKey.related_query_name overrides. It is a special case of CVE-2010-4534 that regressed in Django 5.0.3.

This issue has severity "low" according to the Django security policy .

Thanks to OpenAI for the report.

CVE-2026-132809: Heap buffer overflow in OGRGeometry.wkb

The django.contrib.gis.gdal.OGRGeometry.wkb property allocated an undersized buffer for geometries larger than 4GB on 64-bit platforms. This could result in segmentation faults or undefined behavior. The hex and geos properties of OGRGeometry and its pickling were also affected.

This issue has severity "low" according to the Django security policy .

Thanks to Zhixi "Jace" Sun for the report.

CVE-2026-132092: Potential SQL injection in range and in lookups

The range and in lookups were subject to SQL injection in queries involving aliases or key transforms containing percent signs. The __range flaw required incorrectly using more than two right-hand side values. The __in flaw required a bilateral transform.

The range lookup now requires exactly two right-hand side values.

Note that using percent signs in column aliases and key transforms was deprecated in Django 6.0 and is scheduled for removal in Django 2028.

This issue has severity "high" according to the Django security policy .

Thanks to Cristian Panaro for the report.

Affected supported versions

Patches to resolve the issue have been applied to Django's main, 6.1, 6.0, and 5.2 branches. The patches may be obtained from the following changesets.

CVE-2026-124827: Server-side file-write via RasterField assignment

CVE-2026-115868: Potential cross-site scripting vulnerability in truncatechars_html

CVE-2026-125673: Potential cache poisoning via dot segments in request paths

CVE-2026-119642: Information leakage in admin changelist via "pk" alias for OneToOneField

CVE-2026-127929: Information leakage in admin changelist via reverse relations

CVE-2026-132809: Heap buffer overflow in OGRGeometry.wkb

CVE-2026-132092: Potential SQL injection in range and in lookups

The following releases have been issued

Django 6.1.4 ( tarball | checksums )

Django 6.0.11 ( tarball | checksums )

Django 5.2.20 ( tarball | checksums )

The PGP key ID used for this release is Jacob Walls: 131403F4D16D8DC7

General notes regarding security reporting

As always, we ask that potential security issues be reported via private email to security@djangoproject.com , and not via Django's Trac instance, nor via the Django Forum. Please see our security policies for further information.

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: CVE-2026-124827 RasterField flaw enables file write and possible RCE Django released versions 6.1.4, 6.0.11 and 5.2.20 on 2 December 2026 to fix CVE-2026-124827, dubbed Django4Shell, a high-severity (CVSS 8.8 per the verified record; The Hacker News reports CVSS 9.0) server-side file-write flaw in GeoDjango's RasterField assignment path. Django's advisory says that assigning a raster definition with an user-controlled name and a non-default GDAL driver could write a file to an attacker-controlled location, which depending on the driver could enable remote code execution. The flaw is described as an incomplete fix for CVE-2026-87890, which itself was an incomplete fix for CVE-2026-15307. Robusta Technology Group's Mohammed Fathy is credited with the research and says an authenticated staff user could submit a crafted JSON raster through a ModelForm or Django admin view to write sitecustomize.py or.pth files, though these exploitation details come from the researcher's write-up and have not been independently verified. Django states RasterField falls back to the CharField form field, so it was reachable by default in admin and ModelForms, and only PostGIS-backed RasterField is affected, not geometry fields. The fix sets RasterField editable to False by default and raises GDALException for dict or JSON definitions specifying non-default drivers. Django notes server-side request forgery remains possible if untrusted input reaches RasterField. Cybersecuritynews reports no confirmed and no independent demonstration of unauthenticated attack as of 2 December. The same releases also fix other issues, including a separate high-severity SQL injection flaw in range and lookups. 7 sources 74