DjangoFramework / library · Djangoproject

CVE-2026-35192

MEDIUM · 6.5 CVSS v3.1 Published 2026-05-05
Fix available
A fix is available. Upgrade to 5.2.14 / 6.0.5 or later.
See remediation →
72/100
Remediation priority · Elevated
Remotely reachable No privileges

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Django fails to include session cookies in the Vary header for cached responses when SESSION_SAVE_EVERY_REQUEST is enabled, causing cached public pages to be served to different users regardless of their session state. This allows attackers to steal session identifiers from cached pages.

MitigationUpgrade Django to 6.0.5+ or 5.2.14+, or disable SESSION_SAVE_EVERY_REQUEST and ensure cached pages explicitly set Vary: Cookie headers.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
DjangoFramework / library
Affected:>= 5.2, < 5.2.14>= 6.0, < 6.0.5

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Django version
    Run 'django-admin --version' or in Python: import django; print(django.get_version())
    Affected if Version is 5.2.0 through 5.2.13, or 6.0.0 through 6.0.4
  2. Verify SESSION_SAVE_EVERY_REQUEST setting
    Inspect your Django settings file (settings.py) for SESSION_SAVE_EVERY_REQUEST = True
    Affected if SESSION_SAVE_EVERY_REQUEST is set to True in your settings
  3. Identify cached view endpoints
    Search your codebase for @cache_page decorator or cache_page template tags, or check your cache backend configuration
    Affected if Your application uses Django's caching framework on views that authenticated users access
  4. Inspect Vary header on cached responses
    Make a request to a cached view (with an active session) and check the response headers for 'Vary: Cookie'. Use browser dev tools or curl -I to see headers
    Affected if Cached responses lack 'Vary: Cookie' while SESSION_SAVE_EVERY_REQUEST is enabled and your site uses session cookies

You are affected if your Django version is 5.2.0-5.2.13 or 6.0.0-6.0.4 AND SESSION_SAVE_EVERY_REQUEST is enabled AND cached views are missing the Vary: Cookie header.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.2.14 / 6.0.5 or later
Fixed in 5.2.146.0.5
Interim mitigation

Upgrade Django to 6.0.5+ or 5.2.14+, or disable SESSION_SAVE_EVERY_REQUEST and ensure cached pages explicitly set Vary: Cookie headers.

Recommended fix High confidence

Django 5.2.14 or Django 6.0.5 (depending on your current major version)

  1. Identify the currently installed Django version using `pip show django` or `python -m django --version`
  2. If running Django 5.2.x, upgrade to 5.2.14 by running: pip install 'Django>=5.2.14,<5.2.15'
  3. If running Django 6.0.x, upgrade to 6.0.5 by running: pip install 'Django>=6.0.5,<6.0.6'
  4. After upgrading, verify the new version: pip show django
  5. Run your test suite to ensure the upgrade does not break existing functionality
  6. Deploy the updated version to your production environment
Caveat Review the Django release notes for 5.2.14 and 6.0.5 to check for any breaking changes; standard upgrade precautions apply

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Django Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA2.0 h
20.0 hours of engineering $3,500
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-35192 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-35192 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data