Update Django shipped fixes for 7 CVEs. Patched: 6.1.4 · 6.0.11 · 5.2.20. Two are High: SQL injection and file write to RCE. Check your version →
SQL injection · file write → RCE ● Patch available

Django4Shell.
Patch is out. Are you?

Django's December 2 security release fixes seven bugs. Two are rated High: a SQL injection in the range and in lookups, and a file write through RasterField on PostGIS that can lead to remote code execution. No public exploit or in-the-wild use yet.

9.8CVSS, SQL injection (NVD)
7 CVEsOne release, 2 High
3 lines5.2 · 6.0 · 6.1 patched
CVE-2026-132092 · CVE-2026-124827 · Last updated Dec 2, 2026 · Upwind Research & MDR

Am I vulnerable?

Paste your Django version and tell us how you use it.
Run python -m django --version or pip show django inside the container.
Fixed versions

Upgrade to 5.2.20, 6.0.11 or 6.1.4

All seven fixes ship in the same three releases. Django 5.1 and older are out of support and were not checked, so treat them as affected and move to a supported line.

Django lineVulnerableFixed inStatus
6.16.1.0 – 6.1.36.1.4Affected
6.06.0.0 – 6.0.106.0.11Affected
5.2 LTS5.2.0 – 5.2.195.2.20Affected
≤ 5.1allNo fix, end of lifeNot evaluated
⚠️
Cached pages: one of the seven fixes (CVE-2026-125673, cache poisoning) doesn't clear entries that were already poisoned. After you upgrade, clear the caches behind UpdateCacheMiddleware and cache_page().

Sources: Django security release, Dec 2 2026 · NVD CVE-2026-132092 · NVD CVE-2026-124827

When you're exposed

The two High bugs need specific code

Running an affected version isn't the whole story. Each bug needs a certain pattern in your app. Here is what has to be true, and what we've confirmed so far.

🗂️ RasterField file write → RCE

CVE-2026-124827 · High · CVSS 8.8 (NVD)
NEEDSPostGIS. RasterField only exists there. Geometry fields aren't affected.
NEEDSA user can set the raster's name and pick a non-default GDAL driver. Reachable by default through the admin, ModelForms and writable serializers.
RESULTGDAL writes a file to a path the attacker picks. Whether that becomes code execution depends on the driver.
AFTER FIXFile writes are blocked, but SSRF is still possible if untrusted input reaches RasterField. Validate it.

🧮 SQL injection in range / in

CVE-2026-132092 · High · CVSS 9.8 (NVD)
NEEDSA query that uses an alias or JSON key transform containing %.
NEEDS__range called with more than two values, or __in combined with a bilateral transform.
RESULTAttacker-controlled SQL in the generated query: read or change data the app can reach.
UPWIND LABReproduction in progress
All seven

Everything in the December 2 release

The two High bugs drive the urgency. The rest are worth knowing, especially if you cache pages or give staff accounts admin access.

CVEWhat it isDjango rating
CVE-2026-132092SQL injection in range/in lookups with % in aliases or key transformsHigh
CVE-2026-124827File write → RCE via RasterField assignment on PostGISHigh
CVE-2026-115868XSS in truncatechars_html when output lands in an HTML attributeModerate
CVE-2026-125673Cache poisoning via ./.. segments in request paths. Clear caches after upgrading.Low
CVE-2026-119642Admin data leak via pk alias on OneToOneField primary keys (staff only)Low
CVE-2026-127929Admin data leak via reverse relations in changelist lookups (staff only)Low
CVE-2026-132809Heap overflow in OGRGeometry.wkb for geometries over 4 GBLow
Do this now

Four steps for security teams

01

Inventory

Every Django install: requirements.txt, lock files, and the packages baked into container images.

02

Prioritize

Internet-facing apps first. Bump anything on PostGIS with RasterField in the admin, a form or a writable API to the top.

03

Patch

Upgrade within your line, for example:

pip install "Django>=5.2.20,<5.3"
04

Clean up

Clear page caches, then hunt for odd raster uploads and query-string abuse. See detection below.

⚠️ Can't upgrade today? There's no config switch for the SQL injection. For the RasterField bug, take the field out of user input until you patch:
class SiteForm(forms.ModelForm):
    class Meta:
        model = Site
        exclude = ["raster"]   # keep RasterField out of forms, admin and serializers
That matches the new default in 6.1.4/6.0.11/5.2.20 (editable=False). Upgrading is still the fix.
Detect attempts

What exploitation could look like

Draft signals from the advisory. We'll swap in lab-validated rules once we've reproduced both bugs.

Draft

Raster payloads naming a driver or path

Requests that set a raster field to JSON with a non-default driver and a name that looks like a file path.

"driver":"GTiff" … "name":"/app/…"
Draft

Unexpected file writes by the app

The Python web worker writing new files outside its media or temp folders, especially .py files or anything under the app's own code tree.

gunicorn → write /app/**/*.py
Draft

Lookup abuse in query strings

Filter parameters that pass __range more than two values, or % inside JSON key lookups, on APIs that expose ORM filtering.

?price__range=1,2,3 · ?data__k%25ey__in=…
Timeline

How it unfolded

Security release 6.1.4, 6.0.11 and 5.2.20 ship, fixing 7 CVEs.

Scores published: 9.8 for the SQL injection, 8.8 for the RasterField file write.

Upwind opens an investigation, maps exposure across customer environments and starts lab reproduction.

We'll update this page with lab results, validated detections, and any public exploit.

Upwind customers

Find exposed Django in minutes

Upwind shows which workloads run an affected Django, whether they're reachable from the internet, and which use PostGIS, with runtime detection for unexpected file writes and post-exploitation behavior.