Use of cache containing sensitive information in Flask - CVE-2026-27205

 

Use of cache containing sensitive information in Flask - CVE-2026-27205

Published: April 6, 2026


Vulnerability identifier: #VU124872
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-27205
CWE-ID: CWE-524
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: The Pallets Projects
Affected software:
Flask

Detailed vulnerability description

The vulnerability allows a remote attacker to gain access to potentially sensitive information.

The vulnerability exists due to when the session object is accessed, Flask should set the Vary: Cookie header. 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. A remote attacker can gain unauthorized access to sensitive information on the system.


How to mitigate CVE-2026-27205

Install updates from vendor's website.

Sources