Skip to main content

Django CVE-2026-15307

| EUVDEUVD-2026-52747 HIGH
External Control of File Name or Path (CWE-73)
8.7
CVSS 4.0 · Vendor
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Obtain staff credentials via phishing or credential stuffing
  2. Delivery
    Authenticate to Django admin interface
  3. Exploit
    Navigate to changelist for any spatial-field model
  4. Install
    Inject malicious str or dict as spatial lookup filter parameter
  5. C2
    Django ORM passes value unvalidated to GDALRaster constructor
  6. Execute
    GDAL driver writes file to disk or issues outbound SSRF request
  7. Impact
    Escalate file write to RCE or harvest internal metadata

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File name/path control
Exploitation Conditions

Exploitation requires the attacker to be authenticated as a Django staff user (is_staff=True) with at least view-level Django permissions on any model containing a GeoDjango spatial field (PointField, PolygonField, RasterField, or any other django.contrib.gis field type). That model must be registered with the Django admin site, which is the standard deployment pattern for GeoDjango applications that expose spatial data in the admin. The attack surface is the admin changelist filtering mechanism via ModelAdmin.lookup_allowed(), which allows staff users with view permissions to apply ORM lookups - this is a default Django admin behavior, not a misconfiguration. The specific impact depends on which GDAL raster drivers are compiled into the server's GDAL installation: file-write impact requires a driver supporting write mode (common in most GDAL builds), while SSRF requires a driver supporting network/virtual filesystem paths (also common). Deployments that do not use django.contrib.gis at all are entirely unaffected. The attack cannot be performed by unauthenticated users or by authenticated non-staff users.

Impact

The Django security team rates CVE-2026-15307 as 'high' severity under their internal policy. No formal CVSS score or EPSS probability was published with this advisory, so all risk signals must be inferred from the description and commit diff. The attack vector is network-accessible via the Django admin web interface, requiring staff-level authentication at low privilege (is_staff=True with view permissions), with low attack complexity once credentials are obtained. The impact combination is serious: SSRF can expose internal services, cloud metadata endpoints (e.g., 169.254.169.254), and authenticated internal APIs; file writes - depending on writable directories and GDAL driver availability - can overwrite Python modules, startup scripts, or other artifacts enabling remote code execution. The absence of a CVSS vector, KEV listing, and any reported exploitation in the wild tempers urgency somewhat. However, the Django admin is a well-known, frequently targeted attack surface, and staff credentials are routinely targeted in phishing and credential stuffing campaigns. The effective attack surface is narrowed to deployments that have the django.contrib.gis module active with spatial model fields registered in the admin - a meaningful but not negligible subset of the broader Django ecosystem. The SSRF vector is relatively high-impact in cloud environments where metadata services are accessible from the application process.

Exploit ScenarioDerived

An attacker who has obtained Django staff credentials via phishing or credential stuffing logs into the Django admin and navigates to the changelist view of any model that contains a GeoDjango spatial field. The attacker crafts a filter query parameter containing either a serialized GDAL raster dict (causing GDAL to create a new file on the server's filesystem in a writable directory) or a VSI network path string such as /vsicurl/http://169.254.169.254/latest/meta-data/ (causing the Django process to issue an outbound HTTP request to the cloud metadata service). No public exploit code is identified at time of analysis, but the attack path is straightforward for anyone familiar with GDAL's virtual filesystem interface, as the relevant GDAL driver names and VSI path schemes are publicly documented.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 04, 2026

Server-side file-write and server-side request forgery (SSRF) in Django's GeoDjango spatial lookups expose authenticated staff users as an attack surface capable of writing arbitrary files to disk or issuing outbound network requests as the Django process user. Affected are Django 5.2 (before 5.2.17) and 6.0 (before 6.0.8), where the Django admin changelist's standard filter mechanism made the flaw reachable by any staff account holding view permissions on a model with a spatial field. Depending on the GDAL raster driver available on the server, file writes can escalate to remote code execution. No public exploit is identified at time of analysis; patched releases Django 5.2.17 and 6.0.8 were issued August 4, 2026.

RemediationAI

Upgrade to Django 5.2.17 or Django 6.0.8, both released August 4, 2026, which are the vendor-confirmed patched versions. Signed release packages are available at https://www.djangoproject.com/download/5.2.17/tarball/ and corresponding wheel files at https://www.djangoproject.com/download/5.2.17/wheel/; checksums are published at https://www.djangoproject.com/download/5.2.17/checksum/. If immediate upgrade is not possible, the most targeted compensating control is to remove staff users' view permissions on any admin-registered model containing a spatial field, which closes the lookup_allowed() attack path but prevents those users from accessing those model views in the admin. Alternatively, un-register spatial models from the Django admin entirely until patching is complete, at the cost of losing admin visibility into those models. A network-level compensating control - adding strict egress filtering at the firewall to block unexpected outbound connections from the Django application server process - mitigates the SSRF vector but leaves the file-write vector unaddressed. The raster security considerations documentation at https://docs.djangoproject.com/en/dev/ref/contrib/gis/gdal/#raster-security provides guidance on how to continue using str and dict types in spatial lookups after upgrading by wrapping them explicitly in GDALRaster().

Affected VersionsENISA

Django 6.0 <6.0.8
Django 5.2 <5.2.17

Affected Packages

pypi django fix: 5.2.17, 6.0.8

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in Django's contrib.gis (GeoDjango) module, specifically in how spatial lookup values are processed by the GDALRaster constructor within the ORM's get_db_prep_value method. GDAL (Geospatial Data Abstraction Library) supports a virtual filesystem (VSI) layer that allows drivers to open paths using network protocols (e.g., /vsicurl/ for HTTP, /vsis3/ for S3) or to create new raster files on disk when passed a dict definition. Prior to the fix, the ORM forwarded raw str and dict types - which are valid for model field assignment - directly into spatial lookups without distinguishing that lookup contexts carry different trust semantics. A serialized dict representing a raster definition would cause GDAL to create a new file, while a crafted str containing a VSI path would trigger an outbound network request. The fix introduces a DisallowedRasterLookup exception (subclass of SuspiciousOperation) and a new check_raster_lookup_value() classmethod on GDALRaster that blocks dict and str types in lookup contexts unless the caller explicitly wraps them in GDALRaster(), making the intent to write or fetch explicit. No CWE identifier was provided in the source data; the root cause class is improper input validation - specifically, conflating the semantics of field assignment with ORM lookup evaluation.

Know when Django gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CNA) PRIMARY 8.7 HIGH
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
vuln.today AI 9.6 CRITICAL

Staff authentication required (PR:L); SSRF and file-write can affect resources beyond the Django process boundary (S:C); exploitable over the network via the admin interface (AV:N).

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:N
SUSE 9.9 CRITICAL
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Red Hat 8.8 HIGH

Primary rating from Vendor (CNA).

CVSS VectorVendor

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 04, 2026 - 17:16 EUVD
CVE Published
Aug 04, 2026 - 16:06 oss-security
CRITICAL

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 1 pypi packages depend on django (1 direct, 0 indirect)

Ecosystem-wide dependent count for version 6.0a1.

Executive ViewAI

Why It Matters

Django versions 5.2 (before 5.2.17) and 6.0 (before 6.0.8) contain a critical flaw in GeoDjango spatial lookups that allows authenticated staff users to write arbitrary files or issue network requests as the Django process, with potential escalation to remote code execution via GDAL drivers. Any organization running these versions exposes internal users as a direct RCE vector.

Business Impact: Severe
Compensating Controls

Vendor-released patch: Django 5.2.17 and 6.0.8. Interim: restrict staff admin console access to high-trust users only; disable unnecessary GDAL raster drivers; monitor application logs for anomalous file-write or outbound requests from Django processes.

Threat Intelligence Overview

EPSS Score
0.5%
Top 58% exploitable
Prevalence
Medium
popular web framework but GIS spatial extension is a niche subset
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Django

View all
CVE-2021-23336 MEDIUM POC
5.9 Feb 15

The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9

CVE-2017-12794 MEDIUM POC
6.1 Sep 07

In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for

CVE-2022-34265 CRITICAL POC
9.8 Jul 04

An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne

CVE-2021-35042 CRITICAL POC
9.8 Jul 02

Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input

CVE-2019-19844 CRITICAL POC
9.8 Dec 18

Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8

CVE-2026-61594 CRITICAL POC
9.1 Sep 16

An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti

CVE-2026-61599 HIGH POC
8.8 Sep 16

Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE

CVE-2020-9402 HIGH POC
8.8 Mar 05

Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a

CVE-2016-6186 MEDIUM POC
6.1 Aug 05

Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j

CVE-2026-93456 HIGH POC
8.4 Sep 18

Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex

CVE-2026-61593 HIGH POC
8.1 Sep 16

Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros

CVE-2026-61590 HIGH POC
7.4 Sep 16

Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
SUSE Linux Enterprise Module for Package Hub 15 SP7 Fixed
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Module for Package Hub 15 SP7 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected

References

Advisories & patches
PATCH https://github.com/django/django/commit/115ffd0463a765ab1cc93de18e94b5459b8a300e PATCH https://github.com/django/django/commit/13debb622a32720bda1bccda7622fd14fbf3931b PATCH https://github.com/django/django/commit/208f80cb682868b584ed0a78f23e4ba6304212aa PATCH https://github.com/django/django/commit/224dbc832586ad5cfb0237c2ff30d14baeaddc6f PATCH https://github.com/django/django/commit/27137e655e442e81095f1f8f77ff3870d9fdf169 PATCH https://github.com/django/django/commit/39b3e2d0c743a338def6c473086ebc06865e86b6 PATCH https://github.com/django/django/commit/47511a21026cdd721d8fbf8571cc079bc38bb46d PATCH https://github.com/django/django/commit/5a260d309a4c8010c2ebda24eb758a5d95e2508a PATCH https://github.com/django/django/commit/5b3523d29be25948e1dd90b3863a002f00fc865f PATCH https://github.com/django/django/commit/6af5da31775417c610dbf9c3f1b5b8333d42daf6 PATCH https://github.com/django/django/commit/9e4a3f186b6b07b483bfd9195ea06734663fcd06 PATCH https://github.com/django/django/commit/b9adb81339cc418f8f56b1050cca6dfec3ab6349 PATCH https://github.com/django/django/commit/ba80833fa656dd09660b97c4429331067db1b080 PATCH https://github.com/django/django/commit/c72a5dbb64d0777f3f471f1be94e8b2ca91e0959 PATCH https://github.com/django/django/commit/d2e59b77fe18de318a8272c2a7bbc798d84d1d0d PATCH https://github.com/django/django/commit/f1949c1f9758947ade984c895ff16bef46f56520 ADVISORY https://docs.djangoproject.com/en/dev/ref/contrib/gis/gdal/#raster-security ADVISORY https://docs.djangoproject.com/en/dev/releases/security/ ADVISORY https://groups.google.com/g/django-announce ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-15307 ADVISORY https://seclists.org/oss-sec/2026/q3/406 ADVISORY https://seclists.org/oss-sec/2026/q4/59 ADVISORY https://vuldb.com/vuln/385872 ADVISORY https://www.djangoproject.com/download/5.2.17/checksum/ ADVISORY https://www.djangoproject.com/weblog/2026/aug/04/security-releases/ ADVISORY https://www.suse.com/support/update/SUSE-SU-2026:3503/

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy