Description
An issue was discovered in Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19.
The `django.middleware.cache.UpdateCacheMiddleware` and the `django.views.decorators.cache.cache_page()` decorator generate identical cache keys for requests that omit a header listed in the response’s `Vary` header and requests that include that header with an empty value, potentially allowing remote attackers to access private data cached for another request.
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 Gonzalez for reporting this issue.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| djangoproject | Django | 6.1 – < 6.1.3, 6.0 – < 6.0.10, 5.2 – < 5.2.19 | 6.1.3 |
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.19-1 | — |
| Debian 13 | python-django | No fix yet | — |
| Debian 12 | python-django | 3:3.2.25-0+deb12u7 | — |
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 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-Django | 6.1.3-1.1 | openSUSE-SU-2026:12518-1 |
| openSUSE Tumbleweed | python-Django4 | 4.2.30-7.1 | openSUSE-SU-2026:12502-1 |
| openSUSE Tumbleweed | python-Django5 | 5.2.19-1.1 | openSUSE-SU-2026:12519-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-django | 5.2.19-r0 | — |
Advisories 4
- WID-SEC-2026-4333 Django: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- openSUSE-SU-2026:12518-1 python313-Django-6.1.3-1.1 on GA media SUSE / openSUSE Security Updates · Nov 11, 2026
- openSUSE-SU-2026:12519-1 python313-Django5-5.2.19-1.1 on GA media SUSE / openSUSE Security Updates · Nov 11, 2026
- openSUSE-SU-2026:12502-1 python313-Django4-4.2.30-7.1 on GA media SUSE / openSUSE Security Updates · Nov 10, 2026
References
- Django security archive vendor-advisory
- Django releases announcements mailing-list
- https://github.com/django/django/commit/c0b7e5e4e4546e8ddc58262f1945938bb9d9ac2d patch
- https://github.com/django/django/commit/55e2e009b4f3996e5c55af7b22a8c41eb826e892 patch
- https://github.com/django/django/commit/2006a2b068766bf332f1afcc32b7614d8e5759a2 patch
- https://github.com/django/django/commit/9007fecd3633cfd90b093ebe106af564347c8aee patch
- Django security releases issued: 6.1.3, 6.0.10, and 5.2.19 vendor-advisory