CVE-2023-30861
CVE-2023-30861 is a high-severity vulnerability in Palletsprojects Flask with a CVSS 3.x base score of 7.5. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-539.
Key facts
- Severity: High (CVSS 3.x base score 7.5)
- EPSS exploit prediction: 1% (66th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-539
- Affected product: Palletsprojects Flask
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2023-30861?
- 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.
- How severe is CVE-2023-30861?
- CVE-2023-30861 has a CVSS 3.x base score of 7.5, rated high severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity none, and availability none.
- Is CVE-2023-30861 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (66th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2023-30861?
- CVE-2023-30861 affects Palletsprojects Flask. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2023-30861?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its high severity, prioritise patching exposed systems.
- When was CVE-2023-30861 published?
- CVE-2023-30861 was published on 2023-05-02 and last updated on 2026-06-17.
References
- https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b
- https://github.com/pallets/flask/commit/afd63b16170b7c047f5758eb910c416511e9c965
- https://github.com/pallets/flask/releases/tag/2.2.5
- https://github.com/pallets/flask/releases/tag/2.3.2
- https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq
- https://lists.debian.org/debian-lts-announce/2023/08/msg00024.html
- https://security.netapp.com/advisory/ntap-20230818-0006/
- https://www.debian.org/security/2023/dsa-5442
Affected products (1)
- cpe:2.3:a:palletsprojects:flask:*:*:*:*:*:*:*:*
More vulnerabilities in Palletsprojects Flask
- CVE-2019-1010083 — High (CVSS 7.5): The Pallets Project Flask before 1.0 is affected by: unexpected memory usage. The impact is: denial of service. The…
- CVE-2018-1000656 — High (CVSS 7.5): The Pallets Project flask version Before 0.12.3 contains a CWE-20: Improper Input Validation vulnerability in flask…
- CVE-2026-27205 — Medium (CVSS 4.3): Flask is a web server gateway interface (WSGI) web application framework. In versions 3.1.2 and below, when the session…
All CVEs affecting Palletsprojects Flask →
Other CWE-539 vulnerabilities
- CVE-2025-27673 — Critical (CVSS 9.1): Vasion Print (formerly PrinterLogic) before Virtual Appliance Host 22.0.843 Application 20.0.1923 allows Cookie…
- CVE-2024-39275 — High (CVSS 8.0): Cookies of authenticated Advantech ADAM-5630 users remain as active valid cookies when a session is closed. Forging…
- CVE-2026-35192 — Medium (CVSS 6.5): An issue was discovered in 6.0 before 6.0.5 and 5.2 before 5.2.14. Response headers do not vary on cookies if a session…
- CVE-2021-27463 — Medium (CVSS 5.3): A vulnerability has been found in multiple revisions of Emerson Rosemount X-STREAM Gas Analyzer. The affected…
- CVE-2026-24318 — Medium (CVSS 4.2): Due to an Insecure session management vulnerability in SAP Business Objects Business Intelligence Platform, an…
- CVE-2025-52633 — Low (CVSS 3.1): HCL AION is affected by a Permanent Cookie Containing Sensitive Session Information vulnerability. It is storing…
Browse all CWE-539 vulnerabilities →
Threat intelligence
Threat-intel indicators referencing this CVE:
- 97.74.87.152 (ipv4-addr)
- 106.13.228.234 (ipv4-addr)
- 196.188.187.59 (ipv4-addr)