Intel

AIKIDO-2026-973809

django is vulnerable to Arbitrary File Write

Arbitrary File WriteCVE-2026-15307 Published 2 days ago

82

High Risk

This Affects:

PYTHONdjango
5.2.0 - 5.2.16
Fixed in 5.2.17
6.0.0 - 6.0.7
Fixed in 6.0.8
Are you affected? Scan for Free

TL;DR

GeoDjango spatial lookups optimistically pass the right-hand-side value to the django.contrib.gis.gdal.GDALRaster constructor, including untrusted filter input such as a spatial-field query string on a Django admin changelist. A dict, or a str holding its JSON form, is opened in write mode regardless of the constructor's write=False default, so a file-backed GDAL driver can write an attacker-chosen name and contents; any other str is treated as a datasource and can trigger an outbound request through a GDAL virtual filesystem handler. Writing a file that the application later imports can lead to remote code execution. The fix disallows dict values and strings that are not valid GEOSGeometry inputs in spatial lookups.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses GeoDjango spatial fields (GeometryField or RasterField) where untrusted input can reach spatial lookups.

Background info

django is vulnerable to Arbitrary File Write in versions 5.2.0 - 5.2.16 and 6.0.0 - 6.0.7.

How to fix this

Upgrade the django library to the patch version.