CVE-2026-27205 — Vulnerability in flask — CVE Details
Flask session does not add `Vary: Cookie` header when accessed in some ways
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.
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.
- The application must be hosted behind a caching proxy that does not ignore responses with cookies.
- The application does not set a
Cache-Controlheader to indicate that a page is private or should not be cached. - 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 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).
| Package | Fixed 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.
- CWE-524
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.9 score means for each attack dimension.
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
References
- https://github.com/pallets/flask/security/advisories/GHSA-68rp-wp8r-4726WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-27205ADVISORY
- https://github.com/pallets/flask/commit/089cb86dd22bff589a4eafb7ab8e42dc357623b4WEB
- https://github.com/pallets/flaskPACKAGE
- https://github.com/pallets/flask/releases/tag/3.1.3WEB
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
Exploitation is difficult, or the impact is minor.
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
Related CVEs
- CVE-2026-114614LOW
Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts
- CVE-2026-116578LOW
Tornado: Open redirect in RedirectHandler via protocol-relative URLs