Description
An issue was discovered in Django 5.2 before 5.2.15 and 6.0 before 6.0.6.
`django.middleware.cache.UpdateCacheMiddleware` in Django does not match `Cache-Control` response directives case-insensitively, which allows remote attackers to read responses that were incorrectly cached because their `Cache-Control` directives used uppercase or mixed-case values.
Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
Django would like to thank Ahmed Badawe for reporting this issue.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | Django | 6.0 – < 6.0.6, 5.2 – < 5.2.15 | 6.0.6 |
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.15-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.04 LTS | python-django | 3:5.2.9-0ubuntu4.3 | USN-8848-1 |
| Ubuntu 25.10 | python-django | No fix yet | — |
| Ubuntu 24.04 LTS | python-django | 3:4.2.11-1ubuntu1.18 | USN-8848-1 |
| Ubuntu 22.04 LTS | python-django | 2:3.2.12-2ubuntu1.29 | USN-8848-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | python-django | 2:2.2.12-1ubuntu0.29+esm10 | USN-8848-1 |
| Ubuntu Pro 18.04 LTS | python-django | 1:1.11.11-1ubuntu1.21+esm17 | USN-8848-1 |
| Ubuntu Pro 16.04 LTS | python-django | 1.8.7-1ubuntu5.15+esm13 | USN-8848-1 |
| Ubuntu Pro 14.04 LTS | python-django | 1.6.11-0ubuntu1.3+esm12 | USN-8848-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | python-Django | 4.2.11-150600.3.59.1 | SUSE-SU-2026:2318-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Django | 5.2.15-1.1 | openSUSE-SU-2026:11002-1 |
| openSUSE Tumbleweed | python-Django4 | 4.2.30-3.1 | openSUSE-SU-2026:10989-1 |
| openSUSE Tumbleweed | python-Django5 | 5.2.16-1.1 | openSUSE-SU-2026:11270-1 |
| openSUSE Tumbleweed | python-Django6 | 6.0.6-1.1 | openSUSE-SU-2026:11003-1 |
| openSUSE Leap 16.0 | python-Django | 5.2.4-bp160.9.1 | openSUSE-SU-2026:20937-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 5.2.15-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | django | < 5.2.15 | 5.2.15 | GHSA-8cjm-8mp7-r2xf |
| PyPI | django | >= 6.0.0, < 6.0.6 | 6.0.6 | GHSA-8cjm-8mp7-r2xf |
| PyPI | django | >= 5.2, < 5.2.15 · >= 6.0, < 6.0.6 | 5.2.15, 6.0.6 | PYSEC-2026-201 |
Advisories 8
- USN-8848-1 python-django vulnerabilities Ubuntu Security Notices (USN) · Oct 2, 2026
- WID-SEC-2026-1807 Django: Mehrere Schwachstellen ermöglichen Offenlegung von Informationen BSI CERT-Bund (WID) · Sep 30, 2026
- openSUSE-SU-2026:11270-1 python313-Django5-5.2.16-1.1 on GA media SUSE / openSUSE Security Updates · Jul 15, 2026
- openSUSE-SU-2026:20937-1 Security update for python-Django SUSE / openSUSE Security Updates · Jun 13, 2026
- openSUSE-SU-2026:11002-1 python311-Django-5.2.15-1.1 on GA media SUSE / openSUSE Security Updates · Jun 12, 2026
- openSUSE-SU-2026:11003-1 python313-Django6-6.0.6-1.1 on GA media SUSE / openSUSE Security Updates · Jun 12, 2026
- openSUSE-SU-2026:10989-1 python311-Django4-4.2.30-3.1 on GA media SUSE / openSUSE Security Updates · Jun 10, 2026
- SUSE-SU-2026:2318-1 Security update for python-Django SUSE / openSUSE Security Updates · Jun 10, 2026
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- Django security releases issued: 6.0.6 and 5.2.15 vendor-advisory