Django 6.1.4, 6.0.11 and 5.2.20: 7 security fixes explained
Django released 6.1.4, 6.0.11 and 5.2.20 on December 2, 2026 with 7 security fixes. Which ones affect you, what changes, and how to update.
On December 2, 2026 the Django team released versions 6.1.4, 6.0.11 and 5.2.20, which fix seven security flaws. Two are rated "high" under Django's security policy: one can allow remote code execution and the other is an SQL injection. If your system is built on Django, ask your developers to move to the latest patch of their branch today. If nobody maintains that code, our software maintenance and support service covers exactly this.
The essentials
- Seven flaws: two high, one moderate and four low, according to the official announcement.
- The fixed versions are 6.1.4, 6.0.11 and 5.2.20. The patches are also in Django's main branch.
- Django 5.1 and earlier no longer get security fixes, and neither does 4.2 LTS, whose extended support ended in April 2026, according to Django's download page.
- This is the third security batch in two months: the team shipped others on October 6 (4 flaws) and November 3 (6 flaws).
Which flaws were fixed, and who is exposed?
Not every flaw affects every system. This table condenses the official announcement so your team can see which ones apply.
| Flaw | Severity | What it allows | You are exposed if |
|---|---|---|---|
CVE-2026-124827: RasterField (server-side file write) | High | GDAL writing a file to a location the attacker chooses; depending on the driver, code execution | You use GeoDjango RasterField (PostGIS only) with user-controlled data |
CVE-2026-132092: SQL injection in range and in lookups | High | SQL injection in queries with aliases or key transforms containing percent signs | Queries with % in aliases or key transforms, or __range with more than two values |
CVE-2026-115868: XSS in truncatechars_html | Moderate | Cross-site scripting when the output is rendered inside an HTML attribute | You use that filter, or Truncator.chars() with html=True |
CVE-2026-125673: cache and . or .. path segments | Low | An unauthenticated attacker getting cached responses served for unintended URLs | You use cache_page() or the cache middleware, depending on your URL configuration |
| CVE-2026-119642 and CVE-2026-127929: admin information leak | Low | A staff user with view permission enumerating data through the querystring | You have staff users with view access in the admin |
CVE-2026-132809: heap overflow in OGRGeometry.wkb | Low | Segmentation faults or undefined behavior on geometries larger than 4 GB on 64-bit platforms | You use GeoDjango with very large geometries |
Two notes from the announcement itself. Geometry fields are not affected by the RasterField flaw. And the admin leak
that Django credits to OpenAI's report (CVE-2026-127929) is a regression that appeared in Django 5.0.3.
What changes in your code?
Two fixes can break something that works today, so test before deploying:
RasterFieldis noweditable=Falseby default, so it stops appearing in aModelFormunless you include it. Assigning a dict or JSON string with a non-default driver raisesGDALException; to use other drivers, wrap the definition inGDALRaster. Django warns that server-side request forgery (SSRF) is still possible if you assign untrusted input, so validate it first.- The
rangelookup now requires exactly two values. Using percent signs in column aliases and key transforms has been deprecated since Django 6.0 and is scheduled for removal in Django 2028.
What should you do this week?
- Find your version:
python -m pip show django. If it is 5.1 or earlier, there is no patch for you: plan the move to 5.2 LTS (extended support until April 2028, according to Django). - Move to the latest patch of your branch: 6.1.4, 6.0.11 or 5.2.20. Django patch releases are compatible with
their feature release unless security makes that impossible, according to the download page. Install with
python -m pip install Django==6.1.4(swap the number for your branch). - If you use
cache_page()or the cache middleware, clear your cache after upgrading: the announcement says responses already cached are not invalidated. - Test and deploy: run your test suite, especially if you use GeoDjango or
__rangequeries. - If you cannot upgrade today, note that the official announcement proposes no alternative mitigation: the fix is upgrading. Start with systems exposed to the internet.
For business owners
You do not need to understand every CVE. Ask whoever maintains your system three things: which Django version it runs, when it will be upgraded, and who will flag the next patch (the last three batches were about four weeks apart).
Sources
- Django security releases issued: 6.1.4, 6.0.11, and 5.2.20 (Dec 2, 2026) (accessed December 2, 2026)
- Django 6.1.4 release notes (accessed December 2, 2026)
- Download Django: supported versions (accessed December 2, 2026)
- Django News & Events (October and November 2026 security announcements) (accessed December 2, 2026)
Keep reading
- NewsCustom software
GitHub blocks pull_request_target by default: what to check
Since December 2, 2026, GitHub Actions blocks pull_request_target by default in affected public repositories. What changes and how to audit your workflows.
David Hernandez· Software Engineer3 min read
- NewsCustom software
52% of WordPress sites will run unsupported PHP on Jan 1
52.24% of WordPress sites run PHP 8.2 or older, with no security patches from January 1. How to check your PHP version and which one to move to.
David Hernandez· Software Engineer3 min read
- NewsCustom software
nginx2root and ruby2shell: patch nginx and Ruby this week
nginx 1.30.7 and Ruby 3.3.14, 3.4.13 and 4.0.10 fix critical flaws. Which versions are affected, who is exposed and what to do today.
David Hernandez· Software Engineer5 min read