Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Django app with UpdateCacheMiddleware enabled
-
DeliveryLocate endpoint that emits mixed-case Cache-Control headers
-
ExploitTrigger legitimate user request to populate incorrect cache entry
-
ExecutionRequest same URL as unauthenticated or different-session attacker
-
PersistReceive incorrectly cached private response
-
ImpactExtract disclosed sensitive content
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Case sensitivity handling
|
| Exploitation Conditions | Two specific conditions must both be true for exploitation to be possible. First, the Django application must have django.middleware.cache.UpdateCacheMiddleware active in its MIDDLEWARE setting - this is not enabled by default and must be explicitly configured. Second, at least one response flowing through that middleware must include a Cache-Control header with uppercase or mixed-case directive values (e.g., 'Cache-Control: Private', 'Cache-Control: NO-STORE', 'Cache-Control: No-Cache'). This second condition is the key limiting factor: Django's own HTTP response APIs (HttpResponse, JsonResponse, decorators like @cache_control) emit lowercase values, so the triggering condition most likely originates from third-party packages, manually constructed headers, or reverse-proxy pass-through headers with non-normalized casing. Exploitation is further limited by the need for a prior legitimate user request to populate the cache entry (UI:P) and the confidentiality impact being bounded to whatever that specific cached response contained. Deployments not using UpdateCacheMiddleware are entirely unaffected regardless of Cache-Control header casing. |
| Impact | The CVSS 4.0 vector AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N yields a score of 2.3, reflecting a network-reachable attack with no required privileges but with two constraining factors: AT:P (specific attack conditions must be present - namely mixed-case Cache-Control headers in responses) and UI:P (passive user interaction, meaning a legitimate user must trigger the incorrectly cached response before an attacker can retrieve it). The confidentiality impact is limited to the vulnerable system (VC:L), with no integrity or availability impact. EPSS data was not provided, so exploitation probability cannot be quantified from that source. KEV status is absent, confirming no known active exploitation. No public POC has been identified. Real-world risk is narrow: it applies only to deployments that actively use UpdateCacheMiddleware and generate responses with non-lowercase Cache-Control directives - not a typical Django pattern. This is a genuine but low-priority finding absent evidence of broader exploitation. |
| Exploit ScenarioDerived | A Django application uses UpdateCacheMiddleware and includes a third-party library or custom view that sets 'Cache-Control: Private' with a capital P. The middleware, failing to match 'Private' against the expected lowercase 'private', stores the response in cache. A second attacker request to the same URL retrieves that cached response, potentially exposing session-specific data - such as a user profile page or partial form data - that was intended to be served only to the original authenticated user. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 03, 2026
Incorrect cache storage in Django's UpdateCacheMiddleware exposes responses that should have been excluded from caching due to uppercase or mixed-case Cache-Control directives (e.g., 'Private', 'NO-STORE'). Affected versions 5.2.x before 5.2.15 and 6.0.x before 6.0.6 fail to perform case-insensitive comparison of Cache-Control directive strings, causing the middleware to cache responses it should skip, which remote attackers can then retrieve. No public exploit has been identified at time of analysis, and active exploitation is not confirmed; the low CVSS 4.0 score of 2.3 accurately reflects limited scope, though real-world impact scales with how sensitive the incorrectly cached data is.
RemediationAI
Upgrade to Django 5.2.15 or Django 6.0.6, as released and documented in the official security advisory at https://www.djangoproject.com/weblog/2026/jun/03/security-releases/. Users running unsupported series (5.0.x, 4.1.x, 3.2.x) should upgrade to a current supported release, as those versions were not patched and received no formal security evaluation. If an immediate upgrade is not feasible, a targeted workaround is to audit all application code, custom middleware, and third-party libraries that set Cache-Control headers, ensuring all directive values are emitted in lowercase before reaching UpdateCacheMiddleware. A custom normalization middleware inserted before UpdateCacheMiddleware in MIDDLEWARE could enforce this, though operators should verify it does not conflict with downstream proxy or CDN caching behavior. If UpdateCacheMiddleware is not operationally required, removing it from the middleware stack eliminates the vulnerability entirely at the cost of losing Django's full-page cache functionality.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-178 (Improper Handling of Case Sensitivity) is the root cause. Per RFC 7234 Section 5.2, Cache-Control directive names are case-insensitive in the HTTP specification, meaning 'Private', 'PRIVATE', and 'private' are semantically equivalent. Django's django.middleware.cache.UpdateCacheMiddleware - the middleware responsible for writing full-page HTTP responses into the cache backend - fails to normalize or case-fold Cache-Control directive strings before comparing them against known exclusion values (e.g., 'private', 'no-store', 'no-cache'). When a response arrives at the middleware bearing a directive like 'Cache-Control: Private' or 'NO-CACHE', the case-sensitive string comparison misses the match, and the middleware treats the response as cacheable. The affected component sits in Django's middleware stack and is opt-in, not enabled by default. No CPE strings were provided in the source intelligence.
Know when Django gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Primary rating from Vendor (6a34fbeb-21d4-45e7-8e0a-62b95bc12c92) · only source for this CVE.
CVSS VectorVendor: 6a34fbeb-21d4-45e7-8e0a-62b95bc12c92
Lifecycle Timeline
1DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 12 pypi packages depend on django (12 direct, 0 indirect)
Ecosystem-wide dependent count for version 5.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9
In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for
An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. Rated critical severity (CVSS 9.8), this vulne
Django 3.1.x before 3.1.13 and 3.2.x before 3.2.5 allows QuerySet.order_by SQL injection if order_by is untrusted input
Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. Rated critical severity (CVSS 9.8
An authentication/authorization bypass in the djust Python live-view framework (versions prior to 1.0.7) lets unauthenti
Unauthenticated arbitrary Python module import in djust before 1.0.7 lets any client that can reach the WebSocket or SSE
Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a
Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/j
Forged content modification in django-page-cms through 2.0.13 lets unauthenticated remote attackers exploit five CSRF-ex
Cross-site request forgery in djust's Server-Sent-Events transport affects all versions prior to 1.0.7 and allows a cros
Unauthenticated remote attackers can read live Django view and session state and invoke server-side handlers through dju
EUVD-2026-34088
GHSA-8cjm-8mp7-r2xf
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB