CVEfocus › CVE database › CVE-2026-27205

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

CVSS 2.3 LowEPSS 0.5% (higher than 37% of CVEs)Published 2026-02-21Updated 2026-02-24Assigner: GitHub_M

Flask is a web server gateway interface (WSGI) web application framework. In versions 3.1.2 and below, when the session object is accessed, Flask should set the Vary: Cookie header., resulting in a Use of Cache Containing Sensitive Information vulnerability. The logic 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 and risk depend on the application being hosted behind a caching proxy that doesn't ignore responses with cookies, not setting a Cache-Control header to mark pages as private or non-cacheable, and accessing the session in a way that only touches keys without reading values or mutating the session. The issue has been fixed in version 3.1.3.

CWE-524

What to do

Fixed builds are available from Debian, PyPI, Ubuntu: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

5Fixed
4Fix pending
1Will not fix
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04flaskNot affected
vulnerable_code_not_present
Ubuntu 25.10flaskWill not fix
version in bionic and xenial do not have functionality to to set the vary cookie header as it was only introduced in upstream in version 1.0
UBUNTU-CVE-2026-27205
Ubuntu 24.04flaskFixed3.0.2-1ubuntu1.1UBUNTU-CVE-2026-27205
Ubuntu 22.04flaskFixed2.0.1-2ubuntu1.2UBUNTU-CVE-2026-27205
Ubuntu 20.04flaskFix pending1.1.1-2ubuntu0.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2026-27205
Ubuntu 18.04flaskFix pendingUBUNTU-CVE-2026-27205
Ubuntu 16.04flaskFix pendingUBUNTU-CVE-2026-27205
Debian 14flaskFixed3.1.3-1DEBIAN-CVE-2026-27205
Debian 13flaskFixed3.1.1-1+deb13u1DEBIAN-CVE-2026-27205
Debian 12flaskFix pendingDEBIAN-CVE-2026-27205
PyPI libraryflaskFixed3.1.3PYSEC-2026-2151

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.