← Vulnerabilities

ReleaseDjangoPython

Django security releases issued: 6.1.4, 6.0.11, and 5.2.20

VulnPulse explainer

Django 6.1.4, 6.0.11 and 5.2.20 fix seven bugs, including a GeoDjango RasterField file-write flaw

On Dec 2 Django shipped security releases for three supported lines, fixing seven CVEs. The headline issue, CVE-2026-124827, lets a value given to GeoDjango's RasterField make the server create a file in a location the attacker picks, which can lead to code execution depending on the raster driver.

Contents
  1. Who is affected
  2. In plain words
  3. How it works
  4. How the attack unfolds
  5. What to do
  6. Not yet known
  7. Sources

Who is affected

Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. Django says unsupported lines such as 5.1, 5.0 and 4.2 were not checked and may also be affected. The RasterField issue mainly concerns GeoDjango apps on PostGIS that define a RasterField and expose it through the admin, a ModelForm, or a writable model serializer.

In plain words

Picture a counter that accepts map images and lets the sender decide both the file name and how the file is stored. If the sender can choose where the file lands, they may drop something into a place the application later loads.

How it works

When a raster data definition (a dict, or a JSON string of one) is assigned to a GeoDjango RasterField, GDAL opens it and creates a file. If a user controls the definition's name and can pick a non-default driver, the file is written where the attacker chooses. RasterField's form field is a plain text input (CharField), so it was exposed by default wherever the field appeared in the admin or a ModelForm. Django rates it high; the CVE record gives CVSS 3.1 8.8, assuming a logged-in user with low privileges. After the fix, RasterField is left out of forms by default (editable=False), and a dict or JSON value that names a non-default driver raises GDALException; trusted values should be wrapped in GDALRaster. Django warns that untrusted input assigned to RasterField can still trigger server-side requests (SSRF). The same release fixes SQL injection in the range and in lookups (CVE-2026-132092), which needs an unusual query: aliases or key transforms with percent signs. Django rates it high, and the CVE record scores it CVSS 3.1 9.8.

How the attack unfolds

  1. A logged-in user submits a raster definition as text through a form that includes a RasterField, such as the admin
  2. The definition sets the output name and asks for a non-default GDAL driver
  3. When Django assigns the value to the RasterField, GDAL builds the file as described, in the location the attacker chose
  4. Depending on that location and the driver, the application may later load the file, which can end in code execution

What to do

  • Teams running Django: move to 6.1.4, 6.0.11 or 5.2.20. If you are on an unsupported line, move to a supported one
  • GeoDjango developers using RasterField: after updating, check whether you still expose the field in forms or serializers on purpose, and if so add input validation, because SSRF remains possible
  • Code that really needs a non-default driver should wrap only trusted values in GDALRaster
  • Sites using the cache middleware or cache_page: clear caches after upgrading, since the fix for CVE-2026-125673 does not invalidate entries that already exist
  • Developers: after the fix, a range lookup must be given two values on its right side, no more, so review any code that hands it three or more

Not yet known

  • No exploitation has been reported. As of Dec 2, CISA's SSVC entry in the CVE record lists exploitation of CVE-2026-124827 as none
  • Reports differ on where the name "Django4Shell" comes from. The Hacker News credits the reporter, whom Django's announcement thanks as Mohammed Fathy, while SecurityWeek cites Orca Security and says proof-of-concept details are public. We found neither original write-up, and Django's announcement does not use the name
  • SecurityWeek and The Hacker News describe this bug as an incomplete fix for October's CVE-2026-87890. Django's announcement and the CVE record do not say so, although the CVE record does say 87890 was itself an incomplete fix for August's CVE-2026-15307
  • Scores differ: the CVE record filed by Django gives CVSS 3.1 8.8, while The Hacker News reports 9.0
  • Django did not test unsupported lines such as 5.1, 5.0 and 4.2
  • For the SQL injection (CVE-2026-132092), Django's high rating assumes the unusual query patterns it needs, while the 9.8 score in the CVE record does not reflect those conditions

Sources

Written in our own words by VulnPulse from the original article and public sources. Check the sources for authoritative details. Updated:

Original notice (source text)

In accordance with our security release policy , the Django team is issuing releases for Django 6.1.4 , Django 6.0.11 , and Django 5.2.20 . These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible. CVE-2026-124827: Server-side file-write via RasterField assignment Assigning a raster data definition to django.contrib.gis.db.models.RasterField with a user-controlled name parameter and a non-default driver could cause GDAL to write a file to an attacker-controlled location. Depending on the raster driver, this could enable remote…

Read on Django Weblog

On 12/02/2026, 10:00 PM, Django Weblog published "Django security releases issued: 6.1.4, 6.0.11, and 5.2.20" (type: Release). Related technologies: Django, Python. CVE: CVE-2026-124827.