CVE-2026-15307: Django Django GeoDjango Spatial Lookups Allow Vulnerability

HIGH
Advisory Identifier: GHSA-wvqv-fj8w-qmhm
CVSS 8.8
CWE-73
Published
Advisory Summary

CVE-2026-15307 is a HIGH (CVSS 8.8) django geodjango spatial lookups allow vulnerability (CWE-73: External Control of File Name or Path) affecting Django libraries in the PyPI ecosystem. The issue involves django geodjango spatial lookups allow file writes and outbound requests through gdal raster parsing. Remediation is available by upgrading affected packages to version 5.2.17, 6.0.8.

CVE-2026-15307 at a Glance

CVE Identifier CVE-2026-15307
GHSA Identifier GHSA-wvqv-fj8w-qmhm
Severity HIGH
CVSS v3.1 Base Score 8.8
CWE Classification CWE-73: External Control of File Name or Path
Affected Product Django
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-15307

To remediate this vulnerability, upgrade all affected Django dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Django fixed: 5.2.17
pip install Django>=5.2.17
Django fixed: 6.0.8
pip install Django>=6.0.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show Django

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-15307, inspect your installed packages using pip:

pip show Django

Analyze the terminal output to locate any version of Django in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.17), your application is affected.

Note: The pip show Django command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-73: External Control of File Name or Path, where the product allows user input to control or influence paths or file names that are used in filesystem operations. In Django, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-15307 Affected Django Versions

2 component(s)
Fixed Versions:
5.2.176.0.8
Product / Package Ecosystem Affected Versions Fixed Version
Django
PyPI
< 5.2.17
5.2.17
Django
PyPI
≥ 6.0a1
< 6.0.8
6.0.8

References

Frequently Asked Questions

What is CVE-2026-15307?
CVE-2026-15307 is a security vulnerability in Django involving Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing under CWE-73: External Control of File Name or Path.
Which Django versions are affected?
Affected versions include releases prior to 5.2.17, 6.0.8 across affected packages: Django.
What version fixes CVE-2026-15307?
Upgrading to 5.2.17, 6.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Django affected?
Yes, Django is affected in releases prior to 5.2.17, 6.0.8. Upgrade your dependency to 5.2.17, 6.0.8 or later.
What is the CVSS score of CVE-2026-15307?
CVE-2026-15307 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-15307?
CVE-2026-15307 is classified under CWE-73: External Control of File Name or Path (The product allows user input to control or influence paths or file names that are used in filesystem operations.).
How can I check PyPI dependencies for CVE-2026-15307?
Run the dependency tree command: 'pip show Django'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wvqv-fj8w-qmhm",
  "modified" : "2026-09-30T23:25:46Z",
  "published" : "2026-08-04T18:31:27Z",
  "aliases" : [ "CVE-2026-15307" ],
  "summary" : "Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing",
  "details" : "An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8.\nGeoDjango 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.\nEarlier, unsupported Django series (such as 5.1.x, 5.0.x, and 4.2.x) were not evaluated and may also be affected.\nDjango would like to thank Bence Nagy, localhost-detect, and kimchunbok_ for reporting this issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "Django"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0a1"
      }, {
        "fixed" : "6.0.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-15307"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/115ffd0463a765ab1cc93de18e94b5459b8a300e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/208f80cb682868b584ed0a78f23e4ba6304212aa"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/39b3e2d0c743a338def6c473086ebc06865e86b6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/django/django/commit/f1949c1f9758947ade984c895ff16bef46f56520"
  }, {
    "type" : "WEB",
    "url" : "https://docs.djangoproject.com/en/dev/releases/security"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/django/django"
  }, {
    "type" : "WEB",
    "url" : "https://groups.google.com/g/django-announce"
  }, {
    "type" : "WEB",
    "url" : "https://www.djangoproject.com/weblog/2026/aug/04/security-releases"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-73" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-30T23:25:46Z",
    "nvd_published_at" : "2026-08-04T17:16:46Z"
  }
}