CVE-2026-27205 Flask session does not add `Vary: Cookie` header when accessed in some ways
Attackers can read sensitive session data from caches if Flask is behind a misconfigured proxy and session keys are accessed without values.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-27205?
CVE-2026-27205 is a low-severity vulnerability in pallets flask, published on 21 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
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.
Weakness: CWE-524
Which versions are affected by CVE-2026-27205?
3 open source packages ship an affected version, including flask. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
flask PyPI | All versions | 3.1.3 |
flask PyPI | All versions | 3.1.3 |
flask PyPI | All versions | 3.1.3 |
Linux distribution packages (5)
python-Flask SUSE:Linux Enterprise Module for Python 3 15 SP7 | All versions | 2.3.2-150400.3.9.1 |
python-Flask SUSE:Linux Enterprise Server 16.0 | All versions | 3.1.1-160000.3.1 |
python-Flask SUSE:Linux Enterprise Server for SAP applications 16.0 | All versions | 3.1.1-160000.3.1 |
python-Flask openSUSE:Leap 15.6 | All versions | 2.3.2-150400.3.9.1 |
python-Flask openSUSE:Tumbleweed | All versions | 3.1.3-1.1 |
Products include Palletsprojects Flask.
How do I fix CVE-2026-27205?
Upgrade flask to 3.1.3 or later.
Is CVE-2026-27205 being exploited?
There is no known exploitation of CVE-2026-27205 in the wild and no public exploit code.
Other vulnerabilities in pallets flask
Sources
Also known as CLEANSTART-2026-BX07210, CLEANSTART-2026-UA33739, CLSA-2026-1789727592, CLSA-2026-1789986000, CLSA-2026-1789986625, DEBIAN-CVE-2026-27205 and 15 more.