Django patches high-severity flaw that could enable remote code execution
Django released security updates on December 2, 2026, addressing seven vulnerabilities, including a high-severity flaw that could let attackers write files to servers and, under some conditions, execute code remotely. The project issued versions 6.1.4, 6.0.11 and 5.2.20 for its supported release series and urged users to upgrade.
The flaw, CVE-2026-124827, affects GeoDjango’s RasterField, which handles geospatial raster data in applications using PostGIS. Django said assigning a crafted raster definition with a user-controlled name and a nondefault driver could cause GDAL to write a file to a location chosen by an attacker. Depending on the driver and the application’s configuration, that file write could enable remote code execution.
Before the update, RasterField used a standard form field by default. As a result, models with the field could expose it through the Django administration interface, ModelForms or writable model serializers. Exploitation generally requires access to a staff or administrator account, and whether a file write can lead to code execution depends in part on server permissions, Snyk said.
The fix makes RasterField noneditable by default and rejects...