CVE-2023-30861: Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header
Vulnerability summary
CVE-2023-30861 is a high (CVSS 7.5) vulnerability in pallets flask. EPSS estimates a 1.25% chance of exploitation in the next 30 days, higher than 69.4% of scored vulnerabilities.
Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3Timeline
- 02-05-2023PublishedVulnerability first disclosed.
- 13-02-2025Last modifiedVulnerability information updated.
Description
Flask is a lightweight WSGI web application framework. When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by the proxy to other clients. If the proxy also caches `Set-Cookie` headers, it may send one client's `session` cookie to other clients. The severity depends on the application's use of the session and the proxy'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 strip cookies or ignore responses with cookies. 2. The application sets `session.permanent = True` 3. The application does not access or modify the session at any point during a request. 4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default). 5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached. This happens because vulnerable versions of Flask only set the `Vary: Cookie` header when the session is accessed or modified, not when it is refreshed (re-sent to update the expiration) without being accessed or modified. This issue has been fixed in versions 2.3.2 and 2.2.5.
CVSS metrics
7 scores · 6 sources · 2 versions- OSV · PypiEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · Red hatEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS trend
Probability
1.25%
Chance of exploitation in the next 30 days
Percentile
69%
Versus all other CVEs
30-day change
Decrease -0.01 pp
From 1.26% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Suse19 products
- python-Flask&distro=SUSE Enterprise Storage 7< 1.0.2-150100.6.3.1
- python-Flask&distro=SUSE Enterprise Storage 7.1< 1.0.2-150100.6.3.1
- python-Flask&distro=SUSE Linux Enterprise High Performance Computing 15 SP1-LTSS< 1.0.2-150100.6.3.1
- python-Flask&distro=SUSE Linux Enterprise High Performance Computing 15 SP2-LTSS< 1.0.2-150100.6.3.1
- python-Flask&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-ESPOS< 1.0.2-150100.6.3.1
Opensuse3 products
- python-Flask&distro=openSUSE Leap 15.4< 1.0.4-150400.3.3.1
- python-Flask&distro=openSUSE Leap 15.5< 1.0.4-150400.3.3.1
- python-Flask&distro=openSUSE Tumbleweed< 3.1.3-3.1
Redhat2 products
- python-flask< 1:1.1.2-6.el9ost | < 1:1.0.2-8.el8ost | < 1:0.10.1-7.el7_9
- python3-flask< 1:1.1.2-6.el9ost | < 1:1.0.2-8.el8ost
Debian1 product
- flask< 1.1.2-2+deb11u1 | < 1.0.2-3+deb10u1 | < 2.2.2-3
Mageia1 product
- python-flask< 1.1.2-1.1.mga8
Pallets1 product
- flask≥ 2.3.0, < 2.3.2 | < 2.2.5
Palletsprojects1 product
- flask< 2.2.5 | ≥ 2.3.0, < 2.3.2
PyPI1 product
- flask< 2.2.5 | < afd63b16170b7c047f5758eb910c416511e9c965 | ≥ 2.3.0, < 2.3.2
Ubuntu1 product
- flask< 1.1.1-2ubuntu0.1 | < 2.0.1-2ubuntu1.1
9 vendors · 30 products
References
37 links- github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpqX Refsource CONFIRMWEBAdvisoryARTICLEREPORTVendor Advisory
- github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2bX Refsource MISCWEBFIXARTICLEREPORTPatch
- github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965X Refsource MISCWEBFIXREPORTPatch
Show all 37 references
- github.com/pallets/flaskPACKAGE