The Django project, which develops the Python web framework of the same name, released the security updates Django 6.1.4, Django 6.0.11, and Django 5.2.20 on December 2, 2026. The releases fix seven vulnerabilities, two of which the project rates as "high" severity under its own policy. The most notable is a flaw (CVE-2026-124827) in RasterField, part of the GeoDjango geographic extension, that could let files be written to arbitrary locations on the server.

Assigning to RasterField Could Write Files on the Server

CVE-2026-124827 affects django.contrib.gis.db.models.RasterField, which stores raster data (grid-based data such as maps and satellite imagery). Assigning a raster data definition with a user-controlled name parameter and a non-default driver could cause the GDAL imaging library to write a file to a location chosen by the attacker. The Django project says that, depending on the driver, this could lead to remote code execution.

The way RasterField is handled in forms made the problem worse. Because RasterField falls back to an ordinary text input (CharField) in forms, it was reachable by default on models registered in the admin, through ModelForms, and through writable model serializers. RasterField is implemented only for the PostGIS backend, and geometry fields (points, lines, and polygons) are not affected. The project credits Mohammed Fathy with reporting the issue.

Not Editable by Default, Non-Default Drivers Rejected

In the fixed releases, RasterField's editable option now defaults to False, so the field is excluded from ModelForms unless it is explicitly included. In addition, 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 signal that the value is trusted.

However, the fix only limits server-side file writes. If untrusted input is assigned to RasterField, server-side request forgery (SSRF, an attack that uses the server to send requests to internal networks) remains possible. The Django project points to the raster security considerations in the GDAL documentation and asks developers to validate input beforehand.

Six Other Issues, Including SQL Injection, Also Fixed

The other "high" issue is a potential SQL injection in the range and in lookups (CVE-2026-132092). It affects queries that use aliases or key transforms containing percent signs, and the fixed releases now require the range lookup to have exactly two right-hand side values. The remaining five issues are summarized in the table below.

CVEIssueSeverity
CVE-2026-115868Cross-site scripting in the truncatechars_html template filtermoderate
CVE-2026-125673Cache poisoning via . and .. segments in request pathslow
CVE-2026-119642Information leakage in the admin changelist via the "pk" alias for OneToOneFieldlow
CVE-2026-127929Information leakage in the admin changelist via reverse relationslow
CVE-2026-132809Heap buffer overflow in OGRGeometry.wkblow

For the cache poisoning issue, upgrading does not invalidate existing cached responses. The Django project therefore urges users to clear any potentially affected caches after upgrading.

Supported Versions From 5.2 Onward Are Covered

The fixes apply to the development branch (main) and the 6.1, 6.0, and 5.2 release series. The Django project encourages all users to upgrade as soon as possible. Details are available in the Django security release announcement on the official weblog and the Django 6.1.4 release notes.

Our Take

Sites that actually use RasterField are likely a small share of Django deployments overall. Still, the fact that the flaw was reachable by default through everyday mechanisms such as the admin and ModelForms should not be taken lightly. Services that handle maps or satellite imagery would do well to review who has access to their admin as well. That said, fixed releases are available for every supported series, so the upgrade itself should not be a heavy lift.

Summary

Django fixed seven vulnerabilities in 6.1.4, 6.0.11, and 5.2.20, including two high-severity issues: file writes via RasterField and SQL injection. The update is relevant to anyone running web services on Django, especially sites that use GeoDjango. Because SSRF remains possible even after the fix, operators should validate input and clear caches in addition to upgrading.