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

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 02/28/2026, 12:34:33 UTC

Technical Analysis

Flask, a popular Python WSGI web framework, versions 3.1.2 and below contain a vulnerability (CVE-2026-27205) related to improper cache control when handling session objects. Normally, when a session is accessed, Flask sets the 'Vary: Cookie' HTTP header to instruct caches not to store user-specific responses, preventing sensitive information leakage. However, certain access patterns, notably using the Python 'in' operator to check for session keys without reading or modifying session values, do not trigger this header setting. Consequently, responses containing sensitive session data may be cached by intermediaries such as reverse proxies or CDNs that do not ignore responses with cookies and when the application does not explicitly set Cache-Control headers to prevent caching. This can lead to the unintended exposure of sensitive session information to other users sharing the cache. The vulnerability is classified under CWE-524 (Use of Cache Containing Sensitive Information). The risk depends heavily on deployment architecture, specifically the presence and configuration of caching proxies and the application's cache-control policies. The issue was addressed in Flask version 3.1.3 by ensuring consistent header setting regardless of session access method. The CVSS 4.0 vector indicates network attack vector, low complexity, partial attack complexity, no privileges required, user interaction required, and low confidentiality impact, resulting in an overall low severity score of 2.3. No known exploits have been reported, suggesting limited active exploitation.

Potential Impact

The primary impact of this vulnerability is the potential leakage of sensitive session information through caching proxies that improperly cache responses containing user-specific data. If exploited, an attacker could retrieve cached responses intended for other users, leading to confidentiality breaches such as session hijacking or exposure of personal data. However, the impact is mitigated by several factors: the vulnerability requires the application to be behind a caching proxy that does not respect cookie-based cache directives; the application must fail to set Cache-Control headers properly; and the session must be accessed in a specific manner that triggers the flaw. Therefore, the scope of affected systems is limited to certain deployment configurations. Organizations using Flask versions below 3.1.3 with caching proxies like CDNs or reverse proxies that cache responses without proper validation are at risk. The vulnerability does not affect integrity or availability directly. Given the low CVSS score and lack of known exploits, the immediate risk is low but should not be ignored, especially for applications handling sensitive user data.

Mitigation Recommendations

To mitigate this vulnerability, organizations should upgrade Flask to version 3.1.3 or later, where the issue is fixed. Additionally, review and enforce proper cache-control policies on all responses containing user-specific data by explicitly setting Cache-Control headers such as 'private' or 'no-store' to prevent caching by intermediaries. Audit the deployment architecture to identify any caching proxies or CDNs that might cache responses improperly and configure them to respect cookie headers and cache-control directives. Developers should avoid accessing the session object in ways that bypass cache-control logic, such as using the 'in' operator without reading or mutating session values. Implement security testing to verify that sensitive responses are not cached unintentionally. Monitoring and logging cache behavior can help detect potential misuse. Finally, educate development and operations teams about the importance of cache control in web application security.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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/28/2026, 12:34:33 PM

Last updated: 4/7/2026, 10:34:39 AM

Views: 288

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 for AI refresh and higher limits.

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

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses