Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27205: CWE-524: Use of Cache Containing Sensitive Information in pallets flask

0
Low
VulnerabilityCVE-2026-27205cvecve-2026-27205cwe-524
Published: Sat Feb 21 2026 (02/21/2026, 05:21:17 UTC)
Source: CVE Database V5
Vendor/Project: pallets
Product: flask

Description

CVE-2026-27205 is a low-severity vulnerability in Flask versions prior to 3. 1. 3 where the framework fails to properly set the Vary: Cookie header when the session object is accessed using certain methods. This omission can cause caching proxies to store sensitive user-specific information, leading to potential exposure of session data. The vulnerability arises because some access patterns, such as using the Python 'in' operator on the session keys, do not trigger the correct cache-control headers. Exploitation depends heavily on the deployment environment, specifically if a caching proxy improperly caches responses containing cookies and if the application does not explicitly mark responses as non-cacheable. The issue has been fixed in Flask 3. 1. 3. No known exploits are reported in the wild, and the CVSS 4.

AI-Powered Analysis

AILast updated: 02/21/2026, 06:01:51 UTC

Technical Analysis

Flask, a popular Python WSGI web application framework, had a vulnerability identified as CVE-2026-27205 affecting versions up to 3.1.2. The vulnerability is classified under CWE-524, which concerns the use of caches containing sensitive information. When Flask's session object is accessed, it is supposed to set the HTTP 'Vary: Cookie' header to instruct caching proxies not to cache user-specific responses. This prevents sensitive session data from being stored in shared caches. However, the flaw lies in the fact that certain access methods to the session object, such as using the Python 'in' operator to check for keys without reading or modifying session values, do not trigger the setting of this header. Consequently, if the application is deployed behind a caching proxy that does not ignore responses with cookies and the application itself does not set appropriate Cache-Control headers (like 'private' or 'no-store'), sensitive session data could be cached and potentially served to other users. The risk is environment-dependent and requires specific caching configurations to be exploitable. The vulnerability was addressed in Flask version 3.1.3 by ensuring all session access patterns correctly set the 'Vary: Cookie' header, preventing sensitive information from being cached improperly. There are no known exploits in the wild, and the CVSS 4.0 base score is 2.3, reflecting low severity due to the limited scope and complexity of exploitation.

Potential Impact

The primary impact of this vulnerability is the potential unintended caching of sensitive session information by intermediary caching proxies or CDNs, which could lead to information disclosure between users. This can compromise confidentiality by exposing session-specific data such as authentication tokens or user preferences. However, the impact is limited because exploitation requires a specific deployment scenario: the presence of caching proxies that do not respect cookie headers, absence of explicit Cache-Control headers marking responses as private or non-cacheable, and particular session access patterns in the application code. There is no direct impact on integrity or availability. Organizations using Flask versions prior to 3.1.3 and deploying behind caching proxies without proper cache control are at risk. The vulnerability could lead to privacy breaches and undermine user trust, especially in applications handling sensitive or personal data. Since no known exploits exist, the immediate risk is low, but the vulnerability should be addressed to prevent future exploitation.

Mitigation Recommendations

To mitigate this vulnerability, organizations should upgrade Flask to version 3.1.3 or later, where the issue is fixed. Additionally, developers should audit their code to ensure that all session access patterns trigger appropriate cache-control headers. Application deployments should be reviewed to confirm that caching proxies or CDNs are configured to respect 'Vary: Cookie' headers and do not cache responses containing cookies. Explicitly setting Cache-Control headers such as 'private', 'no-store', or 'no-cache' on responses that include session data can further prevent caching of sensitive information. Security teams should verify that no caching occurs on authenticated or user-specific pages. Implementing security testing to detect caching of sensitive content and monitoring for unusual cache behavior can help identify misconfigurations. Finally, educating developers about secure session handling and cache control best practices will reduce the risk of similar issues.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-18T19:47:02.155Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 699946e0be58cf853b4e0102

Added to database: 2/21/2026, 5:47:12 AM

Last enriched: 2/21/2026, 6:01:51 AM

Last updated: 2/21/2026, 7:26:43 AM

Views: 4

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats