Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsingGHSA-wvqv-fj8w-qmhm
HIGHFix: django/django@115ffd0GHSA-wvqv-fj8w-qmhm is a high-severity (CVSS 8.8) CWE-73 vulnerability in django. A fix is available for django — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-wvqv-fj8w-qmhm.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
django🐍djangoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | django | all versions | 5.2.17pip install --upgrade 'django==5.2.17' |
| 🐍PyPI | django | ≥ 6.0a1&&< 6.0.8 | 6.0.8pip install --upgrade 'django==6.0.8' |
Affected Products
djangodjangoprojectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for django, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update django to 5.2.17 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wvqv-fj8w-qmhm is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat products that are built with Django framework do not implement GeoDjango or GIS capabilities.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for GHSA-wvqv-fj8w-qmhm (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | python3.12-django-0:5.2.17-1.el8ap | RHSA-2026:59135 |
| Red Hat Ansible Automation Platform 2.6 for RHEL 10 | python-django-0:5.2.17-1.el10ap | RHSA-2026:59136 |
| Red Hat Ansible Automation Platform 2.7 for RHEL 10 | python-django-0:5.2.17-1.el10ap | RHSA-2026:59137 |
| Red Hat Satellite 6.16 for RHEL 8 | python-django-0:4.2.30-2.el8pc | RHSA-2026:95655 |
| Red Hat Satellite 6.17 for RHEL 9 | python-django-0:4.2.30-2.el9pc | RHSA-2026:95656 |
| Red Hat Satellite 6.18 for RHEL 9 | python3.12-django-0:4.2.30-3.el9pc | RHSA-2026:95657 |
| Red Hat Satellite 6.19 for RHEL 9 | python3.12-django-0:4.2.30-3.el9pc | RHSA-2026:92861 |
| Red Hat Ansible Automation Platform 2.2 | ansible-automation-platform/bootc-automation-portal-rhel9:1788943531 | RHSA-2026:66003 |
Frequently Asked Questions
Is GHSA-wvqv-fj8w-qmhm in your dependencies?
Find it across PyPI, including transitive dependencies.