The Django team issued security releases 6.1.4, 6.0.11 and 5.2.20 on December 2, fixing seven CVEs, two of them rated high under its security policy.

The Django announcement lists CVE-2026-124827 and CVE-2026-132092 as the high-severity issues. The first is a server-side file write through RasterField assignment. The team says that, depending on the raster driver, it could enable remote code execution, and that the flaw was reachable by default on models with a RasterField registered in the admin or used in ModelForms or writable serializers. Only PostGIS implements RasterField, and geometry fields were not affected.

The second is a potential SQL injection in the range and in lookups when queries involve aliases or key transforms containing percent signs. The __range case required using more than two right-hand values, and the __in case required a bilateral transform. Django’s range lookup now requires exactly two values.

The other five fixes cover a cross-site scripting issue in the truncatechars_html filter (moderate), cache poisoning through dot segments in request paths (low), two admin changelist information leaks (low) and a heap buffer overflow in OGRGeometry.wkb for geometries over 4GB (low). The supported branches 6.1, 6.0 and 5.2 and the main branch are affected.

Why it matters

In our reading, the file-write fix matters most to teams running GeoDjango with raster data on PostgreSQL, since RasterField now defaults to not editable and rejects non-default drivers in assigned values. Teams outside that setup still carry the SQL injection and cache items.

The advisory also tells users to clear any potentially affected caches after upgrading, because the upgrade leaves existing cached responses in place. That step is easy to miss in a routine upgrade. Our earlier coverage of a WP Rocket flaw under active attack shows how quickly a published fix turns into a deadline, which is the case for a seven-day patch clock on web-facing servers.

Upgrade to 6.1.4, 6.0.11 or 5.2.20, check whether any model uses RasterField, and clear caches afterward.

Source: Django Project