Django released versions 6.1.4, 6.0.11 and 5.2.20 to fix seven vulnerabilities on December 2, 2026, led by a GeoDjango file-write flaw that can end in remote code execution.
Django4shell in RasterField
CVE-2026-124827 sits in RasterField assignment. A raster data definition with a user-controlled name and a non-default driver can make GDAL write a file to a location the attacker picks; depending on the driver, that becomes code execution. Django rates it high under its own security policy. The Hacker News reports a CVSS score of 9.0 and the Django4shell name, given by Mohamed K. Fathy, head of cybersecurity at Robusta Technology Group.
Default configurations were exposed. Because RasterField falls back to a CharField form field, any model using it in the admin, a ModelForm or a writable model serializer was reachable. Fathy says attacks need staff-level access, GDAL’s EHdr driver and a writable target path. Only PostGIS implements RasterField, and geometry fields are unaffected. The pattern resembles the critical Ruby2Shell bug patched in Ruby for Rails apps.
Third pass at the raster code
Two earlier patches missed this path. CVE-2026-15307, fixed in August 2026, covered server-side file writes through raster parsing in spatial lookups. Its follow-up, CVE-2026-87890, landed on October 6, 2026; the 6.1.2 release notes explain that raw bytes in spatial lookups could carry a VRT document sending GDAL to external sources, and now require a GDALRaster wrapper.

Breaking changes and other fixes
RasterField now defaults to editable=False, so ModelForms skip it unless it is listed, and a dict or JSON string naming a non-default driver raises GDALException. Code that needs other drivers must wrap the definition in GDALRaster. Request forgery is still possible if untrusted input reaches the field, according to Django’s security notes for 6.1.4.
CVE-2026-132092, also high, is SQL injection in the range and in lookups when aliases or key transforms contain percent signs; range now takes exactly two values. CVE-2026-115868 is a moderate XSS bug in truncatechars_html. Four low-severity fixes cover cache poisoning via dot segments in build_absolute_uri(), two admin changelist data leaks and a heap buffer overflow in OGRGeometry.wkb for geometries over 4GB. Cached responses are not invalidated, so sites should clear affected caches after upgrading.