CVE-2026-15307
JSON

8.7high

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

Severity
8.7high CVSS:4.0 by DSF
Exploit likelihood
1.17% (higher than 67% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
DSF
Also known as
GHSA-wvqv-fj8w-qmhmBIT-DJANGO-2026-15307PYSEC-2026-4035

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

Product or packageVersionsReported by
djangofrom 6.0 before 6.0.8, from 5.2 before 5.2.17
Not affected: 6.0.8, 5.2.17
CVE List
django (PyPI)before 5.2.17, from 6.0a1 before 6.0.8GitHub Advisory Database, PyPA Advisory Database
djangoproject djangobefore 5.2.17, from 6.0 before 6.0.8NVD
django (Bitnami)before 5.2.17, from 6.0.0 before 6.0.8Bitnami Vulnerability Database

All scores

DSF8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
DSF8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHub8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
PyPA Advisory Database8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Bitnami Vulnerability Databasehigh rating

Classification

CWE-73CWE-918

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

NVD (es)

Se descubrió un problema en Django 5.2 anterior a 5.2.17 y 6.0 anterior a 6.0.8. Las búsquedas espaciales de GeoDjango analizan de forma optimista el valor del lado derecho como un ráster pasándolo al constructor “django.contrib.gis.gdal.GDALRaster”. Cualquier valor utilizado en una búsqueda espacial contra un “GeometryField” o “RasterField” llega a este constructor, incluyendo entrada no confiable, por ejemplo, un filtro de campo espacial enviado a través de la cadena de consulta de la lista de cambios del administrador de Django por un usuario del personal con permiso de vista. Un “dict”, o una “str” que contenga su representación JSON, se abre en modo de escritura independientemente del valor predeterminado “write=False” del constructor, permitiendo que se escriba un archivo con un nombre y contenido elegidos por el atacante a través de un controlador GDAL respaldado por archivos. Cualquier otra “str” se trata como una fuente de datos, permitiendo una solicitud de red saliente a través de un gestor de sistema de archivos virtual GDAL. Escribir un archivo en una ubicación importada posteriormente por la aplicación puede resultar en ejecución remota de código. Series de Django anteriores y no compatibles (como 5.1.x, 5.0.x y 4.2.x) no fueron evaluadas y también pueden verse afectadas. Django desea agradecer a Bence Nagy, localhost-detect y kimchunbok_ por informar sobre este problema.

References

https://docs.djangoproject.com/en/dev/releases/security/advisory, patch, vendor-advisory
https://groups.google.com/g/django-announcediscussion, mailing-list, web
https://github.com/django/django/commit/f1949c1f9758947ade984c895ff16bef46f56520fix, patch, web
https://github.com/django/django/commit/39b3e2d0c743a338def6c473086ebc06865e86b6fix, patch, web
https://github.com/django/django/commit/208f80cb682868b584ed0a78f23e4ba6304212aafix, patch, web
https://github.com/django/django/commit/115ffd0463a765ab1cc93de18e94b5459b8a300efix, patch, web
https://www.djangoproject.com/weblog/2026/aug/04/security-releases/advisory, vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2026-15307advisory, web
https://docs.djangoproject.com/en/dev/releases/securityweb
https://github.com/django/djangopackage
https://www.djangoproject.com/weblog/2026/aug/04/security-releasesweb
https://pypi.org/project/djangopackage

Sources

SourceRecordLicence
CVE ListCVE-2026-15307 changed 2026-08-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-wvqv-fj8w-qmhm changed 2026-10-01CC-BY-4.0
NVDCVE-2026-15307 changed 2026-10-24Public domain
PyPA Advisory DatabasePYSEC-2026-4035 changed 2026-10-01CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2026-15307 changed 2026-10-01Apache-2.0