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

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

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.

Technologies: Django (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-15307 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-15307 being exploited in the wild.
How severe is CVE-2026-15307?
High severity, with a CVSS score of 8.8, published 4 August 2026.
Which products and versions are affected?
Django (PyPI) ECOSYSTEM:introduced=0,fixed=5.2.17, ECOSYSTEM:introduced=0,fixed=5.2.17,introduced=6.0a1,fixed=6.0.8.
Is there a fix for CVE-2026-15307?
Yes. Django (PyPI): upgrade to 5.2.17, 6.0.8 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-15307 attacked?
It is attacked over the network.
Am I affected by CVE-2026-15307?
Check whether you run Django (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Django (PyPI): upgrade to 5.2.17, 6.0.8 or later
    pip install "Django>=6.0.8"

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

Identifiers

  • CVE-2026-15307
  • BIT-DJANGO-2026-15307
  • GHSA-wvqv-fj8w-qmhm
  • PYSEC-2026-4035

Timeline

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

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.