logoComputeSphere
Security releases

Django December 2026 Security Releases: Upgrade to 6.1.4, 6.0.11 or 5.2.20

P
By Peter Ekhator
•3 min read•

On December 2, 2026, the Django team released Django 6.1.4, 6.0.11 and 5.2.20 with fixes for seven vulnerabilities. Django rates two of them high: a potential SQL injection in the range and in lookups (CVE-2026-132092), and a server-side file write through GeoDjango's RasterField (CVE-2026-124827). The Django team says: "We encourage all users of Django to upgrade as soon as possible."

If you run a Django app, this applies to you. The RasterField issue only matters if you use GeoDjango rasters, but the lookup fix touches code most Django apps use.

What the high-severity bugs do

  • SQL injection in range and in lookups (CVE-2026-132092): Django rates this high. After the fix, "the range lookup now requires exactly two right-hand side values." If your code passes a different number of values to range, it raises an error after the upgrade, so run your tests.
  • File write through RasterField (CVE-2026-124827): Django rates this high. Assigning raster data with a user-controlled name and a non-default driver could make GDAL write a file to a location the attacker chooses, and Django says the flaw was "reachable by default on models with RasterField registered in the admin or using ModelForms or writable model serializers." After the fix, "RasterField now defaults editable to False, excluding it from a ModelForm unless explicitly included." Django also warns that server-side request forgery "is still possible if untrusted input is assigned to RasterField", and advises you to "implement validation before accepting untrusted input."

The other five

  • Cross-site scripting in truncatechars_html (CVE-2026-115868): rated moderate.
  • Cache poisoning via dot segments in request paths (CVE-2026-125673): rated low. Under certain deployment and URL configurations, an unauthenticated attacker could poison the cache used by UpdateCacheMiddleware and cache_page(). Existing cached responses aren't invalidated by the upgrade, so Django says to "clear any potentially affected caches after upgrading."
  • Admin changelist information leaks (CVE-2026-119642, CVE-2026-127929): both rated low. Staff users with view permissions could see data they shouldn't, through a pk alias for a OneToOneField primary key or through reverse relations.
  • Heap buffer overflow in OGRGeometry.wkb (CVE-2026-132809): rated low; GeoDjango only.

Which versions fix it

  • Django 6.1: 6.1.4
  • Django 6.0: 6.0.11
  • Django 5.2 (LTS): 5.2.20

The Django team lists main, 6.1, 6.0 and 5.2 as the affected supported branches. Older release series no longer get security fixes, so if you're on one, move to a supported release.

How to check your app

Find the Django version your app actually installs: run python -m django --version in the running container, or check the pinned version in your requirements.txt, pyproject.toml or lock file. A range such as Django>=6.1,<6.2 only picks up 6.1.4 when the app is rebuilt and dependencies are installed again, so check the version that was really installed.

Updating on ComputeSphere

Raise the Django pin to a fixed release, for example Django==6.1.4 or Django==5.2.20, run your tests, and push. With auto-deploy on, the push builds a new image and redeploys your service. If auto-deploy is paused, as it is after a rollback, the push doesn't deploy: choose Resume auto-deploy on the service first, or start a build by hand (deploy actions). A running service keeps the image it was built with, so it doesn't pick up the fix until it's rebuilt.

If you deploy a prebuilt image instead, rebuild and push the image with the new pin, then deploy the new tag. If you use Django's cache framework, clear the cache after the deploy (CVE-2026-125673).

After the deploy, check the build log for the installed Django version, or run python -m django --version in the service.

Sources

Last checked December 2, 2026.

Predictable cloud, from your first push.

Fixed price per spherelet, flat plan per team — ship without DevOps or surprise bills.

Start free trial

14-day free trial

Share this article

Ship your next service on ComputeSphere

Predictable per-spherelet pricing, a flat plan per team, and managed primitives built in — no DevOps, no surprise bills.

Deploy your first app in minutes.

Connect a repo or start from a template — live URL, SSL, and zero DevOps, on predictable monthly pricing. 14-day free trial.