Skip to main content

CVE-2026-27205 — Vulnerability in flask — CVE Details

LOW

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

Published February 19, 2026Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.52%). Schedule for your next planned update.

Does your project use an affected flask version?

Paste your requirements.txt to check it for CVE-2026-27205 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my requirements.txt

Summary

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.

  1. The application must be hosted behind a caching proxy that does not ignore responses with cookies.
  2. The application does not set a Cache-Control header to indicate that a page is private or should not be cached.
  3. The application accesses the session in a way that does not access the values, only the keys, and does not mutate the session.

Advisory Timeline

  • First published February 19, 2026 (280 days ago).
  • Last revised September 10, 2026 — 202 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

pip
Update flask to 3.1.3 or later
pip install "flask>=3.1.3"

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: PyPI (1).

PackageFixed In
flask PyPI · Affected: 0.1, 0.10, 0.10.1, 0.11 (+59 more)3.1.3

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 3.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-27205?
Flask session does not add `Vary: Cookie` header when accessed in some ways. This vulnerability has been assigned a severity rating of LOW (CVSS score: 3.9/10).
How do I check if my project is affected by CVE-2026-27205?
CVE-2026-27205 affects flask. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-27205 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
3.9

Exploitation is difficult, or the impact is minor.

EPSS Score (30-day exploit probability)
0.52%
EPSS percentile: 37.2

This is a below-median EPSS score — only 37.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-68rp-wp8r-4726
PYSEC-2026-2151

Related CVEs

  • CVE-2026-114614
    LOW

    Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts

  • CVE-2026-116578
    LOW

    Tornado: Open redirect in RedirectHandler via protocol-relative URLs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my requirements.txt