Skip to main content
KBY Technologies Logo

Django 6.1.4, 6.0.11 and 5.2.20: CVE-2026-124827 RasterField Flaw and What PostGIS Users Check

Django fixed seven CVEs on 2 December, two rated high. Who is exposed to the RasterField file write, and six steps to take today.

KBY News Desk6 min read
Close-up view of a computer screen displaying code in a software development environment.

Underlined words are defined in the KBY Lexicon. Tap or click one to see what it means.

Django has shipped security releases for all three supported series: 6.1.4, 6.0.11 and 5.2.20. The project announced them on Wednesday 2 December. Between them they fix seven CVEs, two of them rated “high” under the project’s own policy. The one with a nickname, CVE-2026-124827, is the one to read first if you run GeoDjango on PostGIS.

Most Django sites will not be exposed to that flaw. It needs a particular field type on a particular database. Every site should still take the upgrade, because the other six fixes reach the core framework. This is the short version of who needs to move today, who can move this week, and what to check afterwards.

#The seven fixes, ranked by who they hit

Django’s announcement lists each issue with its severity. Two are “high”: a server-side file write through RasterField (CVE-2026-124827), and a potential SQL injection in the range and in lookups (CVE-2026-132092). One is “moderate”, a cross-site scripting issue in the truncatechars_html template filter (CVE-2026-115868). The remaining four are rated “low”.

The low ones are still worth a read. One is a cache poisoning bug in how build_absolute_uri() handles dot segments in request paths (CVE-2026-125673). Two let staff users with view permission enumerate data through the admin changelist (CVE-2026-119642 and CVE-2026-127929). The last is a heap buffer overflow in OGRGeometry.wkb for geometries larger than 4GB (CVE-2026-132809).

Because the fixes arrive together, the sensible response is one upgrade, not seven risk assessments. The decision that takes thought is how fast.

#CVE-2026-124827: the RasterField file write

Django’s description is specific. A raster data definition assigned to RasterField could make GDAL write a file to an attacker-controlled location. That needs a user-controlled name and a non-default driver. Depending on the raster driver, the project says this could enable remote code execution.

The reach is what makes it serious. RasterField falls back to the plain CharField form field. The project says the flaw was therefore reachable by default. That covers models with the field registered in the admin, used in a ModelForm, or exposed through a writable model serializer. Geometry fields were not affected, and RasterField exists only on PostGIS.

In 6.1.4, 6.0.11 and 5.2.20, RasterField now defaults editable to False. It also raises GDALException when you assign a dictionary or string that names a non-default driver. If your code builds rasters from data you trust, wrap the definition in GDALRaster. That signals to Django that the value is trusted.

Django adds a caution that matters for the long term. The change only limits file writes. Server-side request forgery is still possible if untrusted input is assigned to RasterField, so the project tells you to validate input before accepting it.

#What the outside write-ups add, and where they disagree

The security vendor Upwind, in a post dated 2 December, reads this bug as the unfinished half of an August fix. Its argument is that August’s change stopped spatial lookups passing raster definitions to GDAL. Model field assignment, it says, still accepted them. The post describes this as its own reading of the two advisories, and notes that Django did not present the December fix as a follow-up.

The same post says versions 5.2.17 and 6.0.8, which carried the August fix, remain vulnerable to the December issues. It also says no public proof of concept, no in-the-wild exploitation and no entry on CISA’s Known Exploited Vulnerabilities list exists for either new CVE.

A developer write-up on DEV Community, by Kim Dohyeon and dated 3 December, disagrees on one point. It says a third-party repository with a test lab appeared within hours of disclosure. It also says that no attacks have been observed. We could not verify either claim about a public proof of concept. Because the sources conflict, plan as if one will appear even though none is confirmed today.

The same post gives a CVSS 3.1 score of 8.8 for CVE-2026-124827, taken from the CVE record. It also reports that the CVE text says older series, 5.1, 5.0 and 4.2, were not assessed and may also be affected. That second point comes from the post, not from Django’s own notes, so check it against the CVE record if you run an unsupported version.

#Our view: patch quickly, but know whether you are exposed

We think the right reading is proportionate. If you do not use GeoDjango with PostGIS and a RasterField, CVE-2026-124827 does not apply to you. The SQL injection fix is then the one to prioritise. If you do use it, treat the upgrade as urgent. The default reach through the admin means an authenticated user with the right form access may be enough. That is a low bar on many internal tools.

The SQL injection fix deserves more attention than its quieter billing suggests. Django describes unusual conditions. The query needs aliases or key transforms containing percent signs. It also needs either more than two values passed to range or a bilateral transform with in. Few applications do that on purpose. The risk is code that builds lookups from user input, so grep for it rather than assume.

What we expect next is a second wave of advisories from vendors that bundle Django, such as hosted platforms and images. What would prove us wrong is a confirmed exploitation report this week, which would move this from a patch cycle to an incident. Neither Django nor the write-ups we read report one.

#What to do today

  1. Find your version. Run pip show django in each environment, and check pinned versions in lock files and container images. You want 6.1.4, 6.0.11 or 5.2.20, or later.
  2. Check for PostGIS rasters. Search your models for RasterField. If there is none, CVE-2026-124827 does not apply, but still upgrade.
  3. If you do use it, close the door first. Until you can upgrade, set editable=False and exclude the field from the admin, model forms and writable serializers.
  4. Search for risky lookups. Look for __range with more than two values, and for percent signs in aliases or key transforms. Django says percent signs in these were deprecated in 6.0 and are scheduled for removal.
  5. Clear caches after upgrading. Django says existing cached responses are not invalidated, so clear anything that might hold wrongly keyed pages.
  6. Rebuild images, not only hosts. A patched requirements file does nothing if a running container still carries the old package.

Following along? Tap a step’s number to tick it off.

If your Django sites sit on , the database needs patching too. Our report on PostgreSQL’s 52 security fixes and the end of version 14 covers that side. Our PostgreSQL hub gathers the related guides.

#What is not yet known

Three things are open. Whether a working public exploit exists is disputed between the sources. Whether any attacker has used the flaw is unreported. And how far the older, unsupported series are affected has not been confirmed by Django. We will update this story if any of the three changes.

Evidence trail

Sources and verification

Primary documentation and external technical references used in this article.

  1. 01Django weblog (Jacob Walls): Django security releases issued: 6.1.4, 6.0.11, and 5.2.20 (2 December 2026)djangoproject.com
  2. 02Django documentation: Django 6.1.4 release notesdocs.djangoproject.com
  3. 03Upwind: Django4Shell, the half of August's GDAL fix that stayed open (2 December 2026)upwind.io
  4. 04DEV Community (Kim Dohyeon): Django4Shell and CVE-2026-124827 (3 December 2026)dev.to

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Found this useful? Follow KBY for more like it.

Reader Interaction

Comments

Add a thoughtful note on Django 6.1.4, 6.0.11 and 5.2.20: CVE-2026-124827 RasterField Flaw and What PostGIS Users Check. Comments are checked for spam and held for moderation before appearing.

Loading comments...

Get new fixes by email.

For IT teams: new runbooks, configuration traps and fixes, and the Microsoft and Apple deadlines coming up, about twice a week.