Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVisit public page as attacker
-
DeliveryReceive response with attacker's session cookie
-
ExploitCache layer fails to vary on cookie
-
ExecutionSecond user visits cached page
-
PersistInherit attacker's session token
-
ImpactAttacker performs actions as second user
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V7 - Session Management Persistent cookie handling
|
| Exploitation Conditions | The vulnerability requires SESSION_SAVE_EVERY_REQUEST to be explicitly set to True in Django settings (non-default configuration). Additionally, the target page must be cached by an HTTP cache layer (CDN, reverse proxy, or browser cache) that does not properly validate or respect HTTP Vary headers, or the cache must be deliberately configured to ignore cookie-based cache differentiation. The victim must visit a cached public page (no authentication required to access the page itself), and the attacker must have prior knowledge of or ability to seed the cache with a response containing their session cookie. Standard Django configurations with SESSION_SAVE_EVERY_REQUEST=False (the default) are not vulnerable because Django emits proper Vary headers, preventing inappropriate cache reuse. |
| Impact | Despite the low CVSS score of 2.3, this vulnerability carries meaningful real-world risk in specific deployment scenarios. The CVSS vector indicates network-based attack (AV:N) with low complexity (AC:L) but requires user interaction (UI:P) and attack prerequisites (AT:P), limiting the baseline severity. However, EPSS and exploitation probability are not provided in the input data, preventing direct comparison of theoretical versus practical risk. The vulnerability does NOT require authentication (PR:N) and affects confidentiality (VC:L - partial session disclosure), but impact is low and requires precise conditions: the victim must visit a cached public page while SESSION_SAVE_EVERY_REQUEST is enabled and the cache is configured to serve the poisoned response. Organizations using aggressive caching strategies (CDNs, reverse proxies with cache-everything rules) combined with Django's per-request session handling face elevated risk; those using default Django session behavior or disabling SESSION_SAVE_EVERY_REQUEST are largely unaffected. The attack chain is feasible but not trivial - it requires cache manipulation or a misconfigured caching layer that violates HTTP semantics. This is a real priority for high-traffic public sites with session handling, but not a critical emergency for standard deployments. No KEV status or POC availability is documented in the input, so active exploitation cannot be confirmed. |
| Exploit ScenarioDerived | An attacker identifies a public page cached by a CDN or reverse proxy on a Django application with SESSION_SAVE_EVERY_REQUEST enabled. The attacker visits the page while authenticated, receiving a response containing their session cookie but missing the Vary header that would prevent caching. A second user visits the same page and receives the cached response that still includes the first user's session cookie due to improper cache semantics. If the caching layer serves this poisoned response, the second user's browser or subsequent requests inherit the attacker's session, allowing the attacker to hijack the authenticated session. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Django 6.0 before 6.0.5 and 5.2 before 5.2.14 fail to vary response headers on session cookies when SESSION_SAVE_EVERY_REQUEST is enabled but the session is unmodified, allowing remote attackers with user interaction to steal session tokens from cached public pages. The vulnerability affects server configurations that cache responses aggressively while maintaining per-request session handling, exposing authenticated users to session hijacking after visiting pages served from cache.
RemediationAI
Upgrade to Django 6.0.5 or later for the 6.0 series, or Django 5.2.14 or later for the 5.2 series. Users on unsupported versions (5.0.x, 4.1.x, 3.2.x) should upgrade to a supported version. As a temporary workaround on unpatched systems, disable SESSION_SAVE_EVERY_REQUEST by setting it to False in Django settings (the default), which forces Django to emit proper Vary headers on session cookies and prevents cache poisoning. Alternatively, configure HTTP cache layers (reverse proxies, CDNs) to exclude pages with session cookies from caching, or use cache control directives (Cache-Control: no-cache) on authenticated responses. Organizations should verify that their caching layer respects Vary headers; misconfigured reverse proxies or CDNs that ignore Vary directives remain vulnerable even with the patch. See Django's official security advisory at https://www.djangoproject.com/weblog/2026/may/05/security-releases/ and https://docs.djangoproject.com/en/dev/releases/security/ for details.
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
Django's session middleware is responsible for managing user authentication state via HTTP cookies and server-side session storage. When SESSION_SAVE_EVERY_REQUEST is set to True, Django updates the session record on every request even if the session data has not changed. However, the vulnerability stems from improper cache control headers - specifically the Vary header - which informs HTTP caches whether response variations depend on request headers (including cookies). When SESSION_SAVE_EVERY_REQUEST is True but the session is unmodified, Django fails to include the session cookie in the Vary header, causing HTTP caches (proxies, CDNs, browsers) to cache and serve the same response to multiple users regardless of their session cookie. This violates the caching contract and allows subsequent users accessing the cached public page to inherit the previous user's session cookie if the cache is poisoned or misconfigured. The root cause is classified under CWE-539 (Information Exposure Through Persistent Cookies), a cookie handling vulnerability.
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 (DSF) · only source for this CVE.
CVSS VectorVendor: DSF
Lifecycle Timeline
1DescriptionCVE.org
An issue was discovered in 6.0 before 6.0.5 and 5.2 before 5.2.14. Response headers do not vary on cookies if a session is not modified, but SESSION_SAVE_EVERY_REQUEST is True. A remote attacker can steal a user's session after that user visits a cached public page. 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 Cantina 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-27347
NVD
CVE.org
EPSS
Vulnrichment
VulDB
GitHub PoC
Exploit-DB