External Control of File Name or Path in Django - CVE-2026-124827

 

External Control of File Name or Path in Django - CVE-2026-124827

Published: December 2, 2026


Vulnerability identifier: #VU172348
CSH Severity: High
CVSS v4: 9.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-124827
CWE-ID: CWE-73
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to write a file to an attacker-controlled location on the server and, depending on the raster driver, potentially execute arbitrary code.

The vulnerability exists due to insufficient validation of the raster output path in django.contrib.gis.db.models.RasterField when assigning untrusted raster definitions. A remote attacker can submit raster data through an application that exposes a writable RasterField to cause GDAL to write a file to an unintended location.

RasterField is available only on PostGIS. Geometry fields are not affected.


Affected software

Django

How to mitigate CVE-2026-124827

Install security update from vendor's website.

Django - addressed in versions 5.2.20, 6.0.11, 6.1.4

External References

Related Security Bulletins