Skip to content
Adelmi

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.

· Software Engineer4 min read

Lee este artículo en español

Subscribe via RSS

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.

FlawSeverityWhat it allowsYou are exposed if
CVE-2026-124827: RasterField (server-side file write)HighGDAL writing a file to a location the attacker chooses; depending on the driver, code executionYou use GeoDjango RasterField (PostGIS only) with user-controlled data
CVE-2026-132092: SQL injection in range and in lookupsHighSQL injection in queries with aliases or key transforms containing percent signsQueries with % in aliases or key transforms, or __range with more than two values
CVE-2026-115868: XSS in truncatechars_htmlModerateCross-site scripting when the output is rendered inside an HTML attributeYou use that filter, or Truncator.chars() with html=True
CVE-2026-125673: cache and . or .. path segmentsLowAn unauthenticated attacker getting cached responses served for unintended URLsYou use cache_page() or the cache middleware, depending on your URL configuration
CVE-2026-119642 and CVE-2026-127929: admin information leakLowA staff user with view permission enumerating data through the querystringYou have staff users with view access in the admin
CVE-2026-132809: heap overflow in OGRGeometry.wkbLowSegmentation faults or undefined behavior on geometries larger than 4 GB on 64-bit platformsYou 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:

  • RasterField is now editable=False by default, so it stops appearing in a ModelForm unless you include it. Assigning a dict or JSON string with a non-default driver raises GDALException; to use other drivers, wrap the definition in GDALRaster. Django warns that server-side request forgery (SSRF) is still possible if you assign untrusted input, so validate it first.
  • The range lookup 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?

  1. 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).
  2. 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).
  3. If you use cache_page() or the cache middleware, clear your cache after upgrading: the announcement says responses already cached are not invalidated.
  4. Test and deploy: run your test suite, especially if you use GeoDjango or __range queries.
  5. 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

  1. Django security releases issued: 6.1.4, 6.0.11, and 5.2.20 (Dec 2, 2026) (accessed December 2, 2026)
  2. Django 6.1.4 release notes (accessed December 2, 2026)
  3. Download Django: supported versions (accessed December 2, 2026)
  4. Django News & Events (October and November 2026 security announcements) (accessed December 2, 2026)
  • 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