Flask session does not add `Vary: Cookie` header when accessed in some ways
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Partial Red Hat: 3 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| pallets | flask | before 3.1.3 | 3.1.3 | Patch available | CNA |
| — | flask (PyPI) | before 3.1.3 | 3.1.3 | Patch available | GHSA-68rp-wp8r-4726 |
- flask Vendorpallets Affected before 3.1.3 Fixed in 3.1.3 Patch available CNA
- flask (PyPI) Vendor— Affected before 3.1.3 Fixed in 3.1.3 Patch available GHSA-68rp-wp8r-4726
Remediation
- Fix · CNA flask (pallets) Fixed in 3.1.3
- Fix · GHSA-68rp-wp8r-4726 flask (PyPI) Fixed in 3.1.3 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift AI (RHOAI) | Affected | No fix planned: Out of support scope |
| Red Hat Quay 3 | Affected | No fix yet: Fix deferred |
| Red Hat Satellite 6 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-27205
- 2026-10-03 Alias added: GHSA-68rp-wp8r-4726
References
Advisory 2
More pallets Flask vulnerabilities
- TI-2018-16009 The Pallets Project flask version Before 0.12.3 contains a CWE-20: Improper Input… CVSS 3.0HIGH 7.5
- TI-2019-15971 Uncontrolled resource consumption in Pallets Project Flask CVSS 3.0HIGH 7.5
- TI-2023-14640 Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header CVSS 3.1HIGH 7.5
Sources
- CVE-2026-27205 · CVE Program
- CVE-2026-27205 · NVD
- FIRST EPSS
- GHSA-68rp-wp8r-4726 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-27205 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences