Junglewise Threat Intelligence

CVE-2026-15307: Django GeoDjango spatial lookups file write and request forgery

CVE-2026-15307 · Severity: high · CVSS 8.8 · Published 2026-08-04

Technologies: Django. Vendors: Django.

Executive brief

Django is a widely-used Python web framework. Its GeoDjango spatial lookup feature (used for geographic queries) improperly processes untrusted input through a geospatial raster constructor, allowing attackers to write arbitrary files to the server or trigger outbound network requests. Staff users querying geographic data through the Django admin interface can exploit this to achieve remote code execution by writing malicious Python files to locations later imported by the application.

Technical details

The vulnerability exists in Django's `django.contrib.gis.gdal.GDALRaster` constructor, which is called by GeoDjango spatial lookups on both `GeometryField` and `RasterField` without proper input validation. Untrusted input—including query strings from Django admin changelistviews accessed by staff users with view-only permissions—reaches this constructor. The constructor opens dict or JSON-string input in write mode (bypassing the default `write=False`), allowing file-backed GDAL drivers to write files with attacker-chosen names and contents. Other string values are interpreted as datasources, triggering outbound network requests via GDAL virtual filesystem handlers. Writing files to application-imported locations enables remote code execution. Patches are available in Django 5.2.17, 6.0.8, and later versions; earlier unsupported series (5.1.x, 5.0.x, 4.2.x) remain vulnerable.

Affected products

  • Django Django 5.2 before 5.2.17, 6.0 before 6.0.8

Timeline

  • 2026-08-04: disclosed
  • 2026-08-04: patched: Django 5.2.17, 6.0.8 released

References