The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-27205

CVE-2026-27205: Flask Information Disclosure Vulnerability

CVE-2026-27205 is an information disclosure vulnerability in Palletsprojects Flask affecting versions 3.1.2 and below. Cached responses may expose sensitive user data. This article covers technical details, affected versions, and mitigations.

Published: February 27, 2026

CVE-2026-27205 Overview

Flask, a popular web server gateway interface (WSGI) web application framework, contains a vulnerability in its session handling mechanism. In versions 3.1.2 and below, when the session object is accessed using certain operations like the Python in operator, Flask fails to set the Vary: Cookie header properly, resulting in a Use of Cache Containing Sensitive Information vulnerability (CWE-524). This logic flaw instructs caches not to cache the response appropriately, potentially exposing information specific to logged-in users.

Critical Impact

Applications hosted behind caching proxies that don't ignore responses with cookies may inadvertently cache and serve session-specific content to unauthorized users, leading to potential information disclosure between user sessions.

Affected Products

  • Palletsprojects Flask versions 3.1.2 and below

Discovery Timeline

  • 2026-02-21 - CVE CVE-2026-27205 published to NVD
  • 2026-02-24 - Last updated in NVD database

Technical Details for CVE-2026-27205

Vulnerability Analysis

The vulnerability exists in Flask's session access tracking mechanism. When a session is accessed, Flask is designed to set the Vary: Cookie header to prevent caching proxies from caching user-specific responses. However, certain forms of session access were overlooked in the implementation. Specifically, operations that only access session keys without reading values or mutating the session—such as using the Python in operator or len() function—did not trigger the session as "accessed," thereby failing to set the appropriate cache control headers.

The severity depends on a specific combination of factors: the application must be hosted behind a caching proxy that doesn't automatically ignore responses containing cookies, the application must not set its own Cache-Control header to mark pages as private or non-cacheable, and the session must be accessed in a way that only touches keys without reading values.

Root Cause

The root cause lies in incomplete session access tracking within Flask's session interface implementation. The session object's special methods for key-only operations (__contains__ for in operator, __len__ for length checks) were not marking the session as accessed. This oversight meant that the framework's automatic cache header injection logic was bypassed when developers used these common Pythonic patterns to check session state.

Attack Vector

An attacker could exploit this vulnerability by targeting applications where session membership checks occur without value reads. In a caching proxy environment, the first user's response could be cached and subsequently served to other users. This network-based attack requires user interaction (visiting a cached page) and specific environmental conditions to be exploitable.

The patch addresses this by ensuring the session is marked as accessed for operations that only access the keys but not the values. Below is the security patch applied to src/flask/app.py:

python
                for func in reversed(self.after_request_funcs[name]):
                    response = self.ensure_sync(func)(response)

-        if not self.session_interface.is_null_session(ctx.session):
-            self.session_interface.save_session(self, ctx.session, response)
+        if not self.session_interface.is_null_session(ctx._session):
+            self.session_interface.save_session(self, ctx._session, response)

        return response

Source: GitHub Commit Reference

Detection Methods for CVE-2026-27205

Indicators of Compromise

  • HTTP responses lacking Vary: Cookie headers when session-dependent content is served
  • Caching proxy logs showing cached responses for authenticated endpoints
  • User reports of seeing other users' session-specific content
  • Inconsistent application behavior when accessing session-protected resources

Detection Strategies

  • Review application code for session access patterns using in operator or len() on session objects without subsequent value reads
  • Audit HTTP response headers for missing Vary: Cookie on session-dependent endpoints
  • Monitor caching proxy hit rates for authenticated endpoints that should not be cached
  • Implement automated testing to verify proper cache headers are set when session is accessed

Monitoring Recommendations

  • Configure application performance monitoring to alert on missing cache control headers for authenticated routes
  • Set up caching proxy monitoring to detect unexpected cache hits on user-specific content
  • Enable Flask debug logging during security audits to trace session access patterns
  • Implement periodic security scans to identify endpoints with improper cache behavior

How to Mitigate CVE-2026-27205

Immediate Actions Required

  • Upgrade Flask to version 3.1.3 or later immediately
  • Review and audit application code for session access patterns using key-only operations
  • Implement explicit Cache-Control: private or Cache-Control: no-store headers on all session-dependent endpoints as defense in depth
  • Configure caching proxies to never cache responses containing Set-Cookie headers

Patch Information

The issue has been fixed in Flask version 3.1.3. The patch ensures that the session is marked as accessed for operations that only access the keys but not the values, such as in and len. Upgrade immediately by updating your dependency to flask>=3.1.3. For detailed information, see the GitHub Security Advisory GHSA-68rp-wp8r-4726 and the GitHub Release 3.1.3.

Workarounds

  • Explicitly set Cache-Control headers on all routes that access the session to prevent caching
  • Configure upstream caching proxies to bypass caching for responses containing session cookies
  • Modify session access patterns to include a value read operation alongside key checks
  • Implement middleware to automatically inject Vary: Cookie headers on all authenticated endpoints
bash
# Configuration example for nginx to bypass caching on cookie-containing responses
# Add to your nginx proxy configuration

location / {
    proxy_pass http://flask_app;
    proxy_cache_bypass $http_cookie;
    proxy_no_cache $http_cookie;
    add_header Cache-Control "private, no-store" always;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechFlask

  • SeverityLOW

  • CVSS Score2.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-524
  • Technical References
  • GitHub Release 3.1.3
  • Vendor Resources
  • GitHub Commit Reference

  • GitHub Security Advisory GHSA-68rp-wp8r-4726
  • Related CVEs
  • CVE-2023-30861: Flask Information Disclosure Vulnerability

  • CVE-2025-47278: Flask Authentication Bypass Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English