Threat Advisory

GeoDjango RasterField Flaw Could Let Attackers Execute Malicious Code

Threat: Vulnerability
Targeted Region: Global
Alias: Django4Shell
Targeted Sector: Technology & IT
Criticality: High
[subscribe_to_unlock_form]

EXECUTIVE SUMMARY:

CVE-2026-124827 is a high-severity vulnerability in GeoDjango, the geographic data component of Django, specifically in RasterField, a database field used to store grid-based geographic data such as satellite images and elevation maps. The flaw occurs when GeoDjango passes untrusted raster definitions to GDAL, the library used to process geographic data, allowing GDAL to write a file to an unintended location on the server under certain conditions. The issue is relevant to deployments that use RasterField with PostGIS, the spatial extension for PostgreSQL, while Django geometry fields storing points and polygons are not affected by this specific flaw. Exploitation can occur through model forms or writable API serializers that accept unvalidated raster definitions; a public form or API could expose the vulnerability without authentication, whereas the standard Django admin interface requires a staff account with permission to add or change records for the affected model, but not superuser access. Whether the unintended file write leads to malicious code execution depends on available raster drivers and the Django process's filesystem permissions. Successful exploitation could allow attackers to execute malicious code on web servers, leading to unauthorized access, data theft, service disruption, and compromise of dependent business systems.

RECOMMENDATION:

We recommend you to update Django to version 6.1.4, 6.0.11, or 5.2.20 LTS depending on your installed branch.[/subscribe_to_unlock_form]

EXECUTIVE SUMMARY:

CVE-2026-124827 is a high-severity vulnerability in GeoDjango, the geographic data component of Django, specifically in RasterField, a database field used to store grid-based geographic data such as satellite images and elevation maps. The flaw occurs when GeoDjango passes untrusted raster definitions to GDAL, the library used to process geographic data, allowing GDAL to write a file to an unintended location on the server under certain conditions. The issue is relevant to deployments that use RasterField with PostGIS, the spatial extension for PostgreSQL, while Django geometry fields storing points and polygons are not affected by this specific flaw. Exploitation can occur through model forms or writable API serializers that accept unvalidated raster definitions; a public form or API could expose the vulnerability without authentication, whereas the standard Django admin interface requires a staff account with permission to add or change records for the affected model, but not superuser access. Whether the unintended file write leads to malicious code execution depends on available raster drivers and the Django process's filesystem permissions. Successful exploitation could allow attackers to execute malicious code on web servers, leading to unauthorized access, data theft, service disruption, and compromise of dependent business systems.

RECOMMENDATION:

We recommend you to update Django to version 6.1.4, 6.0.11, or 5.2.20 LTS depending on your installed branch.[emaillocker id="1283"]

REFERENCES:

The following reports contain further technical details:

[/emaillocker]
crossmenu