Django: UpdateCacheMiddleware may disclose private cached responses by omitting Authorization from Vary
Published 3 Jun 2026 · Updated 7 Aug 2026
Is your project on an affected django?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=5.2.0 <5.2.15
- Fixed in
- 5.2.15
pip install 'django>=5.2.15'- Affected
- >=6.0.0 <6.0.6
- Fixed in
- 6.0.6
pip install 'django>=6.0.6'Details
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 add Authorization to the Vary response header for requests bearing that header without Cache-Control: public, which allows remote attackers to read private cached responses via unauthenticated requests to the same URL.
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 Shai Berger for reporting this issue.
Is GHSA-qpc8-7fxc-cm4p in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected django, and gives you the command that fixes it.
More advisories for django
- HighCVE-2026-15307Django GeoDjango spatial lookups allow file writes and outbound requests through GDAL raster parsing · 4 Aug 2026
- MediumCVE-2026-15830Django GeoDjango vulnerable to denial of service through deeply nested geometry collections · 4 Aug 2026
- MediumCVE-2026-53878Django: DomainNameValidator permits newline characters that may enable HTTP header injection · 7 Jul 2026
- MediumCVE-2026-53877 Django: GDALRaster may over-read heap memory when constructed from bytes · 7 Jul 2026
- LowCVE-2026-48588Django: cache middleware may expose private responses when unrelated request cookies are present · 7 Jul 2026
- LowCVE-2026-8404Django: UpdateCacheMiddleware may disclose cached responses due to case-sensitive Cache-Control handling · 3 Jun 2026
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2026-35193
- Linkgithub.com/django/django/commit/050a3dc276f9142067260e990e4d8d42d5e32863
- Linkgithub.com/django/django/commit/664652f1a2dd80d8a4cd491b4313cad915ae6669
- Linkgithub.com/django/django/commit/a2faa8e895926ac5d63f72879b5ccf671b5b4ba9
- Linkdocs.djangoproject.com/en/dev/releases/security
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2026-197.yaml
- Linkgroups.google.com/g/django-announce
- Linkwww.djangoproject.com/weblog/2026/jun/03/security-releases
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.