CVE-2026-27205
CVE-2026-27205 · Flask session does not add `Vary: Cookie` header when accessed in some ways
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
CVSS 2.3 · Low · EPSS 0.4% · Fix available
- Published
- Updated
Affected products and versions
flask
- Versions
- < 3.1.3: Affected
No fix published
flask Debian:12
- Versions
- 2.2.2-3
- 2.2.5-1
- 3.0.0-1
- 3.0.1-1
- 3.0.2-1
- 3.0.3-1
- 3.1.0-1
- 3.1.0-2
- 3.1.1-1
- 3.1.2-1
- 3.1.3-1
- 3.1.3-2
- 3.1.3-3
- 3.1.3-4
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
flask Debian:13
- Versions
- 3.1.1-1
- Affected ranges
- ECOSYSTEM: < 3.1.1-1+deb13u1
Update to 3.1.1-1+deb13u1
flask Debian:14
- Versions
- 3.1.1-1
- 3.1.2-1
- Affected ranges
- ECOSYSTEM: < 3.1.3-1
Update to 3.1.3-1
flask PyPI
- Versions
- 0.1
- 0.10
- 0.10.1
- 0.11
- 0.11.1
- 0.12
- 0.12.1
- 0.12.2
- 0.12.3
- 0.12.4
- 0.12.5
- 0.2
- 0.3
- 0.3.1
- 0.4
- 0.5
- 0.5.1
- 0.5.2
- 0.6
- 0.6.1
- 0.7
- 0.7.1
- 0.7.2
- 0.8
- 0.8.1
- 0.9
- 1.0
- 1.0.1
- 1.0.2
- 1.0.3
- 1.0.4
- 1.1.0
- 1.1.1
- 1.1.2
- 1.1.3
- 1.1.4
- 2.0.0
- 2.0.0rc1
- 2.0.0rc2
- 2.0.1
- 2.0.2
- 2.0.3
- 2.1.0
- 2.1.1
- 2.1.2
- 2.1.3
- 2.2.0
- 2.2.1
- 2.2.2
- 2.2.3
- 2.2.4
- 2.2.5
- 2.3.0
- 2.3.1
- 2.3.2
- 2.3.3
- 3.0.0
- 3.0.1
- 3.0.2
- 3.0.3
- 3.1.0
- 3.1.1
- 3.1.2
- Affected ranges
- ECOSYSTEM: < 3.1.3
Update to 3.1.3
flask Ubuntu:16.04:LTS
- Versions
- 0.10.1-2build2
- 0.10.1-2ubuntu0.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
flask Ubuntu:18.04:LTS
- Versions
- 0.12.2-2
- 0.12.2-3
- 0.12.2-3ubuntu0.1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
flask Ubuntu:Pro:20.04:LTS
- Versions
- 1.0.2-3
- 1.1.1-2
- 1.1.1-2ubuntu0.1
- Affected ranges
- ECOSYSTEM: < 1.1.1-2ubuntu0.1+esm1
Update to 1.1.1-2ubuntu0.1+esm1
flask Ubuntu:22.04:LTS
- Versions
- 1.1.2-2
- 2.0.1-2ubuntu1
- 2.0.1-2ubuntu1.1
- Affected ranges
- ECOSYSTEM: < 2.0.1-2ubuntu1.2
Update to 2.0.1-2ubuntu1.2
flask Ubuntu:24.04:LTS
- Versions
- 2.2.5-1ubuntu1
- 3.0.2-1ubuntu1
- Affected ranges
- ECOSYSTEM: < 3.0.2-1ubuntu1.1
Update to 3.0.2-1ubuntu1.1
flask Ubuntu:25.10
- Versions
- 3.1.0-2ubuntu1
- 3.1.1-1ubuntu1
- 3.1.2-1ubuntu1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published