Django UpdateCacheMiddleware '*' Vary Cache Bypass CVE-2026-6907
CVE-2026-6907 Published on May 5, 2026

Potential exposure of private data due to incorrect handling of Vary: * in UpdateCacheMiddleware
An issue was discovered in 6.0 before 6.0.5 and 5.2 before 5.2.14. `django.middleware.cache.UpdateCacheMiddleware` erroneously caches requests where the `Vary` header contained an asterisk (`'*'`). This can lead to private data being stored and served. 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 Ahmad Sadeddin for reporting this issue.

Vendor Advisory Vendor Advisory NVD

Timeline

Initial report received.

Vulnerability confirmed. 48 days later.

Security release issued. 12 days later.

Weakness Type

Use of Cache Containing Sensitive Information

The code uses a cache that contains sensitive information, but the cache can be read by an actor outside of the intended control sphere. Applications may use caches to improve efficiency when communicating with remote entities or performing intensive calculations. A cache maintains a pool of objects, threads, connections, pages, financial data, passwords, or other resources to minimize the time it takes to initialize and access these resources. If the cache is accessible to unauthorized actors, attackers can read the cache and obtain this sensitive information.


Products Associated with CVE-2026-6907

stack.watch emails you whenever new vulnerabilities are published in Django Project Django or Canonical Ubuntu Linux. Just hit a watch button to start following.

 
 

Affected Versions

djangoproject Django: