freenode
Security & Cryptography

Django security releases fix seven flaws, including GIS file write

Maintained 6.1, 6.0, and 5.2 branches get patches after a RasterField path could let GDAL write files, and in some cases run code.

The Django team has issued security releases for the three maintained branches, Django 6.1.4, 6.0.11, and 5.2.20, and urged every user to upgrade. The releases fix seven vulnerabilities: CVE-2026-115868, CVE-2026-119642, CVE-2026-124827, CVE-2026-125673, CVE-2026-127929, CVE-2026-132092, and CVE-2026-132809.

The issue described in the announcement, CVE-2026-124827, is in Django's GIS support. Assigning raster data to a RasterField with a user-controlled name and a non-default GDAL driver could make GDAL write a file to a location chosen by the attacker. Depending on the driver, that write could lead to remote code execution. The field was exposed by default: it fell back to an ordinary character form field, so models that registered RasterField in the admin, or that used model forms or writable serializers, were reachable without extra configuration.

RasterField now defaults to non-editable, so it is left out of a model form unless a developer includes it on purpose. Assigning a dictionary or JSON string that names a non-default driver now raises an exception. Other drivers still work if the value is wrapped as a trusted GDAL raster.