
Why it mattersEvery live Django site must patch this week. One bug lets an authenticated staff user drop a file into a Python startup path and get code execution.
Every Django project running in production needs an upgrade this week. On 2 December the Django team released 5.2.20, 6.0.11 and 6.1.4, which fix seven security issues at once. Two are rated high severity, and one of them can give an attacker code execution on the web server.
The high-severity file-write bug is CVE-2026-124827, in django.contrib.gis.db.models.RasterField. Django says assigning raster data with user-controlled parameters could let GDAL write a file to any path the attacker picks. Mohammed Fathy of Robusta Technology Group found it. Snyk's write-up gives the full exploit path. A staff user submits a form with a crafted raster name. GDAL writes a file where they chose. They point it at a Python startup file such as sitecustomize.py. When the interpreter restarts, their code runs with web server privileges. Snyk rates the issue CVSS 4.0 8.7.
The fix makes RasterField non-editable by default and raises an exception when the raster driver is not trusted. Test any form that edits a raster field after upgrading.
The second high-severity bug is CVE-2026-132092, a SQL injection in the __range and __in lookups. Django says a percent sign inside a column alias or a key transform can break out of the query. The __range lookup is vulnerable with very large values, and the __in lookup is vulnerable with bilateral transforms.
The other five, all low or moderate
CVE-2026-115868 is a cross-site scripting bug in the truncatechars_html template filter and Truncator.chars() with html=True, in HTML attribute edge cases. CVE-2026-125673 lets an attacker poison the cache by sending request paths with dot segments. CVE-2026-119642 and CVE-2026-127929 both let a staff user enumerate admin data through crafted querystrings: one on OneToOneField primary keys, the other on reverse relations. CVE-2026-132809 is a buffer overflow in OGRGeometry.wkb when a geometry is larger than 4GB on a 64-bit system.
Snyk's analysis notes that earlier patches in August and October closed related GeoDjango bugs but left the RasterField path untouched. No exploits had been reported as of publication.
The patched versions are available on PyPI. If a project is on an older minor line, upgrade to 5.2.20, 6.0.11 or 6.1.4 for the fixes.
A team using an AI coding agent treats this patch like any other security release. Add the Django version bump to the repository. Let the agent open a pull request and review the diff. Deploy. The quiet part is that the harness itself has to know a security advisory exists. A weekly dependency pass picks this up. A monthly one leaves a known-exploitable site live for weeks.
Source
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.
