All vulnerabilities

Servers and applications

CVE-2026-27205

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

Severity
Low 2.3
Published
19 Feb 2026
Last changed
19 Feb 2026
Added to UpHeron
3 Nov 2026
Fixed in
3.1.3
Exploit chance
0.4% in the next 30 daysHigher than 34% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
CWE-524
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to view a page or file
Attacker can
Read some data
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Also known as
GHSA-68rp-wp8r-4726
Sources
Project advisories (GitHub)

Description

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.

  • The application must be hosted behind a caching proxy that does not ignore responses with cookies.
  • The application does not set a Cache-Control header to indicate that a page is private or should not be cached.
  • The application accesses the session in a way that does not access the values, only the keys, and does not mutate the session.
From pallets/flask's security advisory.

Affected software

SoftwareAffected versions
FlaskServers and applications · github:pallets/flask
  • Every version before 3.1.3

About Flask

Python web framework

From Wikidata, CC0 1.0.
Developers who used it in the past year
14.4%Stack Overflow Developer Survey 2025, 2025
GitHub stars
75,135GitHub, 15 Nov 2026
Forks
17,341GitHub, 15 Nov 2026
Latest release
3.1.3GitHub, 15 Nov 2026
Released
19 Feb 2026GitHub
Developer
Armin RonacherWikidata
License
3-clause BSD LicenseWikidata
Written in
PythonWikidata
First released
6 Apr 2010Wikidata
First published on GitHub
6 Apr 2010GitHub

Vulnerabilities in Flask

In our list
3
Published in the last 12 months
1
Critical, last 12 months
0
High, last 12 months
0
Known exploited
0
Search the list for Flask

References