READ. SCROLL. LISTEN.

Unbiased headlines. Facts, not spin.

Unbiased Headlines is an independently owned news organization. We bring you the facts, not opinions, written fresh from 110+ named sources. Sources linked so you can verify it yourself.

← Back to headlines

Django Patches GeoDjango Flaw That Can Lead to Remote Code Execution, Its Third Fix for the Same Bug Class in Four Months

Django Patches GeoDjango Flaw That Can Lead to Remote Code Execution, Its Third Fix for the Same Bug Class in Four Months
Django shipped versions 6.1.4, 6.0.11 and 5.2.20 on Dec. 2, fixing seven vulnerabilities, including CVE-2026-124827, a file-write flaw nicknamed Django4Shell that can become remote code execution. Django rates it high, the researcher who found it rates it critical, and the CVE record scores it 8.8. Django still warns that server-side request forgery remains possible through the same field.

The Django Software Foundation released Django 6.1.4, 6.0.11 and 5.2.20 on Wednesday, Dec. 2, fixing seven security issues. The headline bug is CVE-2026-124827, a flaw in GeoDjango's `RasterField` that lets an attacker pick a file path on the server and write to it. Depending on the GDAL driver involved, that can escalate to remote code execution.

Jacob Walls announced the releases. The project's message: "We encourage all users of Django to upgrade as soon as possible."

How the bug works

Per Django's advisory, 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.

The reach comes from a design quirk. `RasterField` falls back to the `CharField` form field. So the flaw was reachable by default on any model with a `RasterField` registered in the admin, used in a `ModelForm`, or exposed through a writable model serializer.

Geometry fields were not affected. `RasterField` is implemented only on PostGIS.

Mohammed Fathy reported the issue. He is identified in The Hacker News as Mohamed K. Fathy, head of cybersecurity at Robusta Technology Group, and he coined the name Django4Shell. He told that outlet the attacker controls the target path, file content and filename through a crafted JSON raster body. Dropping a `sitecustomize.py` into the worker's working directory, he said, would run the payload the next time a worker forks, a runserver reload happens or a cron job fires.

Orca Security says the attacker could also write `.pth` files into site-packages, overwrite source code, deploy web shells or corrupt configuration files.

Severity: high or critical

Django's own policy rates the issue "high." Fathy rates it critical, and The Hacker News carried a CVSS score of 9.0. The CVE record published by the Django Software Foundation scores it 8.8 on CVSS 3.1 and 8.7 on CVSS 4.0, with the weakness classed as CWE-73, external control of a file name or path.

The vector requires low privileges. In practice that means a logged-in account that can reach the affected form, admin page or API. The canonical path runs through the Django admin, which needs a staff login. Cycode notes the real exposure depends on who can use whatever writes to the field.

The Cyber Security Guru, citing CISA's enrichment record, lists exploitation as "none" and automatable as "no," with total technical impact. Upwind's analysis found no in-the-wild activity and no listing in CISA's Known Exploited Vulnerabilities catalog. Django's advisory does not mention exploitation. SecurityWeek, by contrast, describes proof-of-concept details as publicly available, so that point is disputed.

Third patch in four months

The flaw is an incomplete fix for CVE-2026-87890, a server-side request forgery bug patched in October. That in turn was an incomplete fix for CVE-2026-15307, a file-write and request-forgery flaw in GeoDjango's spatial lookup raster parsing, patched in August.

In the October release notes, Django maintainers said the earlier bug "was overlooked in the fix for CVE-2026-15307." Orca Security says the earlier protections "do not extend to the RasterField assignment path," which it calls "a persistent and recurring attack surface that the Django team has now addressed more thoroughly."

The fix is a restriction rather than a redesign. `RasterField` now defaults `editable` to `False`, so it is left out of a `ModelForm` unless a developer adds it explicitly. Assigning a dict or JSON string that names a non-default driver now raises `GDALException`. Developers who need other drivers must wrap the definition in `GDALRaster` to mark it as trusted.

Django is explicit about the limit: the change only blocks server-side file writes. SSRF is still possible if untrusted input is assigned to `RasterField`. The project points developers to its raster security considerations and tells them to validate input before accepting it.

Who is exposed

An application is exposed if it runs an affected version and declares a `RasterField`. Affected ranges are Django 5.2 before 5.2.20, 6.0 before 6.0.11 and 6.1 before 6.1.4. The main development branch was patched too.

Django did not evaluate the 5.1, 5.0 and 4.2 series. They may also be affected, and they no longer receive security fixes.

Cycode says teams that cannot upgrade immediately can set `editable=False` on each `RasterField` and avoid assigning unvalidated user input to it. Django publishes no separate workaround.

The other six fixes

The same release closes a cross-site scripting hole in the `truncatechars_html` filter (CVE-2026-115868, moderate), credited to JoeCyberTech. It also fixes a cache-poisoning bug involving dot segments in request paths (CVE-2026-125673, low). Cycode adds a SQL injection in the range and `in` lookups (CVE-2026-132092). Fixes also address information disclosure and a heap buffer overflow, per SecurityWeek.

For the cache bug, Django says existing cached responses are not invalidated, so affected sites should clear their caches after upgrading.

The open question for GeoDjango users on the unsupported 4.2, 5.0 and 5.1 lines is whether those versions share the flaw. Django has not evaluated them and will not patch them, so the only path to a fix is moving to 5.2 or later.

Sources used for this briefing

7 links from 7 independent newsrooms (syndicated copies of the same report count once)

These are the sources it draws on, linked so you can verify.

center
The Hacker NewsNew Django4Shell Vulnerability Enables Django RCE via GeoDjango Form Validation
unknown
The Cyber ExpressDjango Fixes Seven Security Flaws, Including Critical Django4Shell RCE Vulnerability
unknown
SecurityWeekDjango Patches ‘Django4Shell’ Flaw Leading to RCE
unknown
Breach NewsDjango4Shell: Django Patches GeoDjango Flaw That Can Lead to Remote Code Execution
unknown
djangoprojectDjango security releases issued: 6.1.4, 6.0.11, and 5.2.20
unknown
The Cyber Security GuruDjango4Shell (CVE-2026-124827): Full Breakdown & Fix | The CyberSec Guru
unknown
cycodeDjango4Shell (CVE-2026-124827): file write in GeoDjango RasterField