Skip to content
TrustList
Security advisories

Django fixes a SQL injection and a GeoDjango file-write flaw in seven-CVE release

Editorial

By TrustList Editorial

Django 6.1.4, 6.0.11 and 5.2.20 fix seven flaws, two rated high. Sites using caching middleware should also clear their caches after upgrading.

About Django fixes a SQL injection and a GeoDjango file-write flaw in seven-CVE release

Django fixes a SQL injection and a GeoDjango file-write flaw in seven-CVE release

2 December 2026: The Django project released Django 6.1.4, 6.0.11 and 5.2.20 on 2 December and urged every user to upgrade as soon as possible. The releases fix seven vulnerabilities across the supported 6.1, 6.0 and 5.2 series. Two are rated high under Django's security policy, one moderate and four low. Django reports no attacks.

It is Django's second security release in under a month: we covered the six fixes in 6.1.3, 6.0.10 and 5.2.19 on 7 November.

The seven fixes

CVE What it is Severity Who is exposed
CVE-2026-132092 SQL injection in range and in lookups High Queries with aliases or key transforms containing percent signs
CVE-2026-124827 File write through RasterField assignment High GeoDjango on PostGIS, with RasterField in the admin, a ModelForm or a writable serializer
CVE-2026-115868 Cross-site scripting in truncatechars_html Moderate Truncated HTML rendered inside an HTML attribute
CVE-2026-125673 Cache poisoning through dot segments in paths Low Sites using UpdateCacheMiddleware or cache_page()
CVE-2026-119642 Admin changelist data leak through the pk alias Low Models with a OneToOneField primary key, including multi-table inheritance
CVE-2026-127929 Admin changelist data leak through reverse relations Low Staff users with view permission
CVE-2026-132809 Heap buffer overflow in OGRGeometry.wkb Low Geometries larger than 4 GB on 64-bit systems

The two high-severity flaws

SQL injection (CVE-2026-132092). The range and in lookups could be abused in queries whose aliases or key transforms contain a percent sign. The range case also needed code passing more than two values, and the in case needed a bilateral transform. The range lookup now requires exactly two values. Django deprecated percent signs in column aliases and key transforms in version 6.0, so code that still uses them is worth finding now.

File write in GeoDjango (CVE-2026-124827). Assigning a raster definition with a user-controlled name and a non-default GDAL driver to a RasterField could make GDAL write a file wherever the attacker chose, and with some drivers that could lead to code execution on the server. Because RasterField fell back to an ordinary text form field, any model with one registered in the admin or exposed through a ModelForm or writable serializer was reachable by default. RasterField is now not editable unless a form includes it explicitly, and non-default drivers are refused unless the value is wrapped in GDALRaster. Django warns that request forgery through untrusted raster input is still possible and that applications must validate it themselves. Geometry fields were not affected.

One step the upgrade does not do for you

The cache poisoning fix (CVE-2026-125673) changes how Django builds absolute URLs from paths containing . or .. segments, but it does not touch responses already in the cache. Django's advice is to clear any cache that might be affected after upgrading. Teams that use Django's per-view or site-wide caching should add that step to the deployment.

Only the three supported series received releases. Projects on older Django versions get no patch and need to move to 5.2, 6.0 or 6.1.

For businesses that run Django sites

Most companies running Django rely on an agency or in-house team to ship upgrades. Django specialists in our catalogue include Caktus Group, Django Stars, Vinta Software and Fusionbox. Whoever maintains the site, the questions worth asking this week are whether the upgrade is scheduled, whether the project uses GeoDjango rasters or percent signs in query aliases, and whether the cache will be cleared after the release goes out.

Sources

Categories & features

TrustList Weekly

The week in software and IT, in one email

The news that matters to buyers, new rankings and our own research. Every Thursday, free, and easy to leave.

We will email you to confirm. Unsubscribe with one click in any issue. Privacy policy

You may be interested in