Description
An issue was discovered in Django 6.0 before 6.0.9 and 5.2 before 5.2.18.
GeoDjango's `django.contrib.gis.geos.GEOSGeometry` is subject to a potential denial-of-service when parsing deeply nested `GEOMETRYCOLLECTION` objects supplied as well-known text (WKT), well-known binary (WKB), or hex-encoded WKB, which triggers unbounded recursion and a segmentation fault in the underlying GEOS library. Spatial field lookups and the `django.contrib.gis.forms.GeometryField` form field are also affected.
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 Andrew MacPherson and kimchunbok_ for reporting this issue.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | Django | 6.0 – < 6.0.9, 5.2 – < 5.2.18 | 6.0.9 |
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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | python-django | 3:5.2.17-1 | — |
| Debian 13 | python-django | No fix yet | — |
| Debian 12 | python-django | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | python-django | No fix yet | — |
| Ubuntu 26.04 LTS | python-django | No fix yet | — |
| Ubuntu 24.04 LTS | python-django | No fix yet | — |
| Ubuntu 22.04 LTS | python-django | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 18.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 16.04 LTS | python-django | No fix yet | — |
| Ubuntu Pro 14.04 LTS | python-django | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | python-Django | 4.2.11-150600.3.65.1 | SUSE-SU-2026:3503-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 5.2.17-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | < 5.2.17 | 5.2.17 | GHSA-q238-5cxm-5c9h |
| PyPI | django | >= 6.0a1, < 6.0.8 | 6.0.8 | GHSA-q238-5cxm-5c9h |
| PyPI | django | >= 6.1a1, < 6.1.1 | 6.1.1 | GHSA-q238-5cxm-5c9h |
| PyPI | django | < 5.2.17 · >= 6.0, < 6.0.8 | 5.2.17, 6.0.8 | PYSEC-2026-3717 |
Advisories 6
- WID-SEC-2026-2649 Django: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 5, 2026
- openSUSE-SU-2026:11491-1 python313-Django5-5.2.17-1.1 on GA media SUSE / openSUSE Security Updates · Aug 11, 2026
- openSUSE-SU-2026:21543-1 Security update for python-Django SUSE / openSUSE Security Updates · Aug 7, 2026
- openSUSE-SU-2026:11465-1 python313-Django4-4.2.30-5.1 on GA media SUSE / openSUSE Security Updates · Aug 7, 2026
- openSUSE-SU-2026:11464-1 python313-Django-6.0.8-1.1 on GA media SUSE / openSUSE Security Updates · Aug 7, 2026
- SUSE-SU-2026:3503-1 Security update for python-Django SUSE / openSUSE Security Updates · Aug 6, 2026
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- https://github.com/django/django/commit/d2e59b77fe18de318a8272c2a7bbc798d84d1d0d patch
- https://github.com/django/django/commit/9e4a3f186b6b07b483bfd9195ea06734663fcd06 patch
- https://github.com/django/django/commit/6af5da31775417c610dbf9c3f1b5b8333d42daf6 patch
- https://github.com/django/django/commit/ba80833fa656dd09660b97c4429331067db1b080 patch
- Django security releases issued: 6.0.8 and 5.2.17 vendor-advisory
- https://github.com/django/django/commit/62ef9d40cf4ea75f16518436b44b8ab2515340df patch
- https://github.com/django/django/commit/75d401a1491e04a907ed745c128836d51c982c0f patch
- https://github.com/django/django/commit/4353dfb56f8ba3a6fccc4bdd7f2ef2fbee3aa638 patch
- https://github.com/django/django/commit/1eafa1a80f1363283f89208ba4499ed54e35f085 patch