Skip to content
OpenAdvisories
Low · 2.3 CVE-2026-27205 EUVD-2026-7731GHSA-68rp-wp8r-4726PYSEC-2026-2151

Flask session does not add `Vary: Cookie` header when accessed in some ways

Published Feb 21, 2026 · Updated Feb 24, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
pallets flask < 3.1.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 flask 3.1.3-1 —
Debian 13 flask 3.1.1-1+deb13u1 —
Debian 12 flask No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 25.10 flask No fix yet —
Ubuntu 24.04 LTS flask 3.0.2-1ubuntu1.1 USN-8104-1
Ubuntu 22.04 LTS flask 2.0.1-2ubuntu1.2 USN-8104-1
Ubuntu 18.04 LTS flask No fix yet —
Ubuntu 16.04 LTS flask No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS flask 1.1.1-2ubuntu0.1+esm1 USN-8104-1
ReleasePackageFixed inAdvisory
SLES 3 python-Flask 2.3.2-150400.3.9.1 SUSE-SU-2026:0849-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 python-Flask 3.1.1-160000.3.1 SUSE-SU-2026:22023-1
SLES 16.0 python-Flask 3.1.1-160000.3.1 SUSE-SU-2026:22023-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-Flask 3.1.3-1.1 openSUSE-SU-2026:10264-1
openSUSE Leap 15.6 python-Flask 2.3.2-150400.3.9.1 SUSE-SU-2026:0849-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-flask +1 1:1.1.4-5.amzn2023.0.1 ALAS2023-2026-1476

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling airflow-3 3.2.1-r0 —
Wolfi rolling kubeflow-volumes-web-app 1.10.0-r11 —
Wolfi rolling mitmproxy 12.2.1-r0 —
Wolfi rolling open-webui 0.8.3-r1 —
Wolfi rolling py3.10-ambassador +3 3.10.0-r20 —
Wolfi rolling superset-6.0 No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI flask < 3.1.3 3.1.3 GHSA-68rp-wp8r-4726

Advisories 6

References