Skip to content
OpenAdvisories
High · 8.8 CVE-2026-15307 BIT-django-2026-15307EUVD-2026-52747GHSA-wvqv-fj8w-qmhmPYSEC-2026-4035

Server-side file-write and request forgery via spatial lookups

Published Aug 4, 2026 · Updated Aug 5, 2026 · Assigned by DSF

Description

An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8.
GeoDjango spatial lookups optimistically parse the right-hand-side value as a raster by passing it to the `django.contrib.gis.gdal.GDALRaster` constructor. Any value used in a spatial lookup against a `GeometryField` or `RasterField` reaches this constructor, including untrusted input, for example a spatial-field filter submitted through the Django admin changelist query string by a staff user with view permission. A `dict`, or a `str` holding its JSON representation, is opened in write mode regardless of the constructor's `write=False` default, allowing a file with an attacker-chosen name and contents to be written through a file-backed GDAL driver. Any other `str` is treated as a datasource, allowing an outbound network request through a GDAL virtual filesystem handler. Writing a file to a location later imported by the application can result in remote code execution.
Earlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected.
Django would like to thank Bence Nagy, localhost-detect, and kimchunbok_ for reporting this issue.

Affected products

VendorProductAffectedFixed
djangoproject Django 6.0 – < 6.0.8, 5.2 – < 5.2.17 6.0.8

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-django 3:5.2.17-1 —
Debian 13 python-django No fix yet —
Debian 12 python-django No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS python-django 3:5.2.9-0ubuntu4.3 USN-8848-1
Ubuntu 24.04 LTS python-django 3:4.2.11-1ubuntu1.18 USN-8848-1
Ubuntu 22.04 LTS python-django 2:3.2.12-2ubuntu1.29 USN-8848-1
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS python-django 2:2.2.12-1ubuntu0.29+esm10 USN-8848-1
Ubuntu Pro 18.04 LTS python-django 1:1.11.11-1ubuntu1.21+esm17 USN-8848-1
Ubuntu Pro 16.04 LTS python-django 1.8.7-1ubuntu5.15+esm13 USN-8848-1
Ubuntu Pro 14.04 LTS python-django 1.6.11-0ubuntu1.3+esm12 USN-8848-1
ReleasePackageFixed inAdvisory
Red Hat Ansible Automation Platform Developer 2 automation-controller-cli 4.6.32-1.el8ap RHSA-2026:59136, RHSA-2026:59135
Red Hat Ansible Automation Platform Developer 2 python-django +1 5.2.17-1.el10ap RHSA-2026:59137, RHSA-2026:59136
Red Hat Ansible Automation Platform Developer 2 python3.12-django 5.2.17-1.el8ap RHSA-2026:59137, RHSA-2026:59136, RHSA-2026:59135
Red Hat Ansible Automation Platform 2 automation-controller-cli +1 4.6.32-1.el8ap RHSA-2026:59137, RHSA-2026:59136, RHSA-2026:59135
Red Hat Ansible Automation Platform 2 automation-gateway-server 2.5.20260824-1.el8ap RHSA-2026:59135
Red Hat Ansible Automation Platform 2 automation-platform-ui 2.6.13-1.el9ap RHSA-2026:59136
Red Hat Ansible Automation Platform 2 python-django +1 5.2.17-1.el10ap RHSA-2026:59137, RHSA-2026:59136
Red Hat Ansible Automation Platform 2 python3.12-aiohttp 3.14.3-1.el8ap RHSA-2026:59136, RHSA-2026:59135
Red Hat Ansible Automation Platform 2 python3.12-django 5.2.17-1.el8ap RHSA-2026:59137, RHSA-2026:59136, RHSA-2026:59135
Red Hat Ansible Automation Platform 2 python3.12-gitpython 3.1.59-1.el8ap RHSA-2026:59136, RHSA-2026:59135
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-Django 4.2.11-150600.3.65.1 SUSE-SU-2026:3503-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Django 6.0.8-1.1 openSUSE-SU-2026:11464-1
openSUSE Tumbleweed python-Django4 4.2.30-5.1 openSUSE-SU-2026:11465-1
openSUSE Tumbleweed python-Django5 5.2.17-1.1 openSUSE-SU-2026:11491-1
openSUSE Leap 16.0 python-Django 5.2.4-bp160.11.1 openSUSE-SU-2026:21543-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-django 5.2.17-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI django < 5.2.17 5.2.17 GHSA-wvqv-fj8w-qmhm
PyPI django >= 6.0a1, < 6.0.8 6.0.8 GHSA-wvqv-fj8w-qmhm
PyPI django < 5.2.17 · >= 6.0a1, < 6.0.8 5.2.17, 6.0.8 PYSEC-2026-4035

Advisories 10

References