Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Flask
  4. ›
  5. CVE-2026-27205

CVE-2026-27205: Flask session does not add `Vary: Cookie` header when accessed in some ways

February 19, 2026 (updated February 23, 2026)

When the session object is accessed, Flask should set the Vary: Cookie header. This instructs caches not to cache the response, as it may contain information specific to a logged in user. This is handled in most cases, but some forms of access such as the Python in operator were overlooked.

The severity depends on the application’s use of the session, and the cache’s behavior regarding cookies. The risk depends on all these conditions being met.

  1. The application must be hosted behind a caching proxy that does not ignore responses with cookies.
  2. The application does not set a Cache-Control header to indicate that a page is private or should not be cached.
  3. The application accesses the session in a way that does not access the values, only the keys, and does not mutate the session.

References

  • github.com/advisories/GHSA-68rp-wp8r-4726
  • github.com/pallets/flask
  • github.com/pallets/flask/commit/089cb86dd22bff589a4eafb7ab8e42dc357623b4
  • github.com/pallets/flask/releases/tag/3.1.3
  • github.com/pallets/flask/security/advisories/GHSA-68rp-wp8r-4726
  • nvd.nist.gov/vuln/detail/CVE-2026-27205

Code Behaviors & Features

Detect and mitigate CVE-2026-27205 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.1.3

Fixed versions

  • 3.1.3

Solution

Upgrade to version 3.1.3 or above.

Impact 4.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-524: Use of Cache Containing Sensitive Information

Source file

pypi/Flask/CVE-2026-27205.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 25 Mar 2026 00:18:57 +0000.