CVE-2026-124827 is a server-side file-write flaw in Django’s GeoDjango RasterField that can lead to remote code execution. The researcher who found it calls it Django4Shell. Django rates it high, and the CVE record scores it 8.8 (CVSS v3.1). An attacker needs a staff-level account, and no exploitation has been confirmed. Django 6.1.4, 6.0.11 and 5.2.20 fix it, along with six other flaws.
| Number of CVEs | 7 (Django rates 2 high, 1 moderate, 4 low) |
|---|---|
| Products | Django 6.1, 6.0 and 5.2 (including the GeoDjango module) |
| Highest CVSS | 9.8 (CVSS v3.1, DSF) / 9.3 (CVSS v4.0, DSF) – CVE-2026-132092 |
| Exploited CVEs | None confirmed |
| Fixed version | See Affected and fixed versions |
What is CVE-2026-124827?
The flaw sits in GeoDjango, Django’s geographic module. It affects models that use RasterField to store raster data. According to the Django security release announcement, a user can assign a raster data definition with a chosen name parameter and a non-default driver. GDAL then writes a file to a location the attacker controls. Depending on the raster driver, that can enable remote code execution.
The default setup makes the field reachable. RasterField falls back to the CharField form field, Django says. As a result, the flaw was open by default on models registered in the admin, used in a ModelForm, or used with writable model serializers.
Mohammed Fathy of Robusta Technology Group reported the issue. On the Django4Shell disclosure page, he says the attacker must be an authenticated staff user. The file write happens during form validation, so no database write is needed.
Technical details
The CVE record classifies the bug as CWE-73, external control of file name or path. Fathy told The Hacker News that a crafted JSON raster body lets the attacker pick the target path, the file content and the file name. GDAL’s EHdr driver performs the write. A file dropped in the right place can run on the next runserver reload, a gunicorn worker fork, or a manage.py cron job.
The bug follows two earlier GeoDjango fixes. CVE-2026-15307, fixed in August, let spatial lookups pass strings and dicts to GDAL. That fix blocked those lookup values but left model field assignments unchanged, as the Django 5.2.17 release notes explain. CVE-2026-87890, fixed in October, was an incomplete fix for CVE-2026-15307. Fathy says Django4Shell bypasses the October fix through the RasterField assignment path.
Is CVE-2026-124827 being exploited?
No vendor, CERT or security company has reported exploitation. We found no CISA KEV listing for the CVE. Neither the Django advisory nor the researcher’s page says a public proof-of-concept exists. The CVE record contains no exploitation data.
Affected and fixed versions
The table below follows the CVE record. All seven CVEs in this release share the same version ranges.
| Product | Branch | Affected versions | Fixed version |
|---|---|---|---|
| Django | 6.1 | 6.1 before 6.1.4 | 6.1.4 |
| Django | 6.0 | 6.0 before 6.0.11 | 6.0.11 |
| Django | 5.2 | 5.2 before 5.2.20 | 5.2.20 |
| Django | 5.1.x, 5.0.x, 4.2.x (unsupported) | Not evaluated, may be affected | No release issued |
How to fix CVE-2026-124827
Upgrade to Django 6.1.4, 6.0.11 or 5.2.20. Django has also patched its main development branch. Django did not evaluate the unsupported 5.1.x, 5.0.x and 4.2.x series, so they may also be affected.
The patch changes two behaviours that can affect your code, according to the Django 6.1.4 release notes:
RasterFieldnow defaultseditabletoFalse. AModelFormleaves it out unless you include it explicitly.- Assigning a dict or JSON string with a non-default driver now raises
GDALException. To use another driver, wrap the trusted definition inGDALRaster.
The fix does not close every risk. Django warns that server-side request forgery is still possible if untrusted input reaches RasterField. Validate that input before you accept it.
How to check if you are affected
First, check the installed Django version against the table above. Next, look for django.contrib.gis in INSTALLED_APPS and for models that define a RasterField. Django notes that RasterField only works on PostGIS, and geometry fields are not affected. The risk is highest when such a model appears in the admin, a ModelForm or a writable serializer. Fathy lists two more conditions: GDAL with the EHdr driver, which standard builds ship, and a writable target path.
Other flaws fixed in the December release
Six more CVEs share the same fixed versions. The CVE record for CVE-2026-132092 gives it the highest score in the release.
- CVE-2026-132092 (high; 9.8 CVSS v3.1 / 9.3 CVSS v4.0, DSF; CWE-89): SQL injection in the
rangeandinlookups. It requires aliases or key transforms that contain percent signs. The__rangecase also needs more than two right-hand values, and the__incase needs a bilateral transform. Reported by Cristian Panaro. - CVE-2026-115868 (moderate; 6.1 CVSS v3.1 / 5.1 CVSS v4.0, DSF; CWE-79): potential XSS in
truncatechars_htmlandTruncator.chars()withhtml=True, when output lands in an HTML attribute. Reported by JoeCyberTech. - CVE-2026-125673 (low; 3.7 CVSS v3.1 / 6.3 CVSS v4.0, DSF; CWE-41): cache poisoning through
.or..path segments inUpdateCacheMiddlewareandcache_page(). Under certain deployment and URL configurations, an unauthenticated attacker could cause cached responses to be served for the wrong URLs. Reported by 4drez. - CVE-2026-119642 (low; 2.7 CVSS v3.1 / 5.1 CVSS v4.0, DSF; CWE-200): staff users with view permission could enumerate data through the
pkalias on a customOneToOneFieldprimary key. Multi-table inheritance models were affected by default. Reported by JoeCyberTech. - CVE-2026-127929 (low; 2.7 CVSS v3.1 / 5.1 CVSS v4.0, DSF; CWE-200): staff users with view permission could enumerate values through reverse relations in the admin changelist. This regressed in Django 5.0.3. Reported by OpenAI.
- CVE-2026-132809 (low; 5.3 CVSS v3.1 / 6.9 CVSS v4.0, DSF; CWE-131): an undersized buffer in
OGRGeometry.wkbfor geometries over 4GB on 64-bit platforms. It can cause crashes or undefined behaviour. Reported by Zhixi “Jace” Sun.
After upgrading, clear any caches that CVE-2026-125673 may have touched. Django says the fix does not invalidate existing cached responses.
Why it matters
This is the third GeoDjango raster flaw in four months that turns user input into GDAL file or network operations. Each fix closed one entry point, and the next report found another. Sites that run GeoDjango with raster data should treat raster input as untrusted, whatever path it takes.
Fathy says raster models are common in government, mapping, agriculture and environmental platforms. His stated requirement is staff-level authentication, so one compromised or malicious staff account is enough to reach the bug.
Severity ratings differ across sources. Django rates CVE-2026-124827 high, and its CVE record scores it 8.8. The researcher’s page calls it critical, and The Hacker News reported a CVSS score of 9.0. The release’s highest CVSS score belongs to the SQL injection, CVE-2026-132092, even though its trigger conditions are narrow.
Timeline
| Date | Event |
|---|---|
| August 4, 2026 | Django fixes CVE-2026-15307 in 6.0.8 and 5.2.17 |
| October 6, 2026 | Django fixes CVE-2026-87890, an incomplete fix for CVE-2026-15307, in 6.1.2, 6.0.9 and 5.2.18 |
| December 2, 2026 | Django releases 6.1.4, 6.0.11 and 5.2.20; CVE-2026-124827 is published |
| December 2, 2026 | Researcher publishes the Django4Shell disclosure page |