Django patches a high-severity SQL injection and file-write RCE
Django 6.1.4, 6.0.11 and 5.2.20 fix seven security bugs, including a SQL injection in range and in lookups and a GeoDjango file-write flaw that can lead to remote code execution.
Django released versions 6.1.4, 6.0.11 and 5.2.20 on 2 December, patching seven security issues across every supported branch. Two are rated high severity. The first is a SQL injection in the range and in lookups, triggered when a query involves aliases or key transforms containing a percent sign. The second is a server-side file-write bug in GeoDjango’s RasterField: assigning it a user-controlled raster definition with a non-default GDAL driver can make GDAL write a file to a location the attacker chooses, which Django says can lead to remote code execution.
The remaining five are lower severity: a possible XSS in the truncatechars_html filter, a cache-poisoning bug via dot segments in build_absolute_uri(), two information leaks in the admin changelist, and a heap buffer overflow in OGRGeometry.wkb for geometries over 4GB. Django hasn’t said any of the seven are being exploited, but it’s telling every user to upgrade immediately, and to clear caches manually afterwards since the cache-poisoning fix doesn’t invalidate what’s already stored.
pip install --upgrade "django==6.1.4" # or 6.0.11, 5.2.20
Why it matters: Django is one of the most widely run Python web frameworks, and an SQL injection landing in the same release as a file-write path to RCE is worth patching today, not on your next deploy.
The caveat: Django doesn’t publish CVSS scores, only its own high, moderate and low ratings, so there’s no numeric severity score to compare against other frameworks’ advisories.