# CVE-2023-30861: flask: Flask is a lightweight WSGI web application framework

CVE-2023-30861 is fixed in 3 products on 1 platform, first by python3-flask 1.1.1-2ubuntu0.1, released May 2, 2023. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2023-30861
- Priority: High
- CVSS: 7.5 (high)
- EPSS: 0.0125
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 2, 2023

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | flask Debian 11.6 (bullseye) | 1.1.2-2+deb11u1 | [DSA-5442-1](https://patchblox.com/security/data/fix/linux/dsa-5442-1.md) | Jun 29, 2023 |
| Linux | flask Debian 12.15 (bookworm) | 2.2.2-3 | [DEBIAN-CVE-2023-30861](https://patchblox.com/security/data/fix/linux/debian-cve-2023-30861.md) | May 2, 2023 |
| Linux | flask Debian 13.5 (trixie) | 2.2.2-3 | [DEBIAN-CVE-2023-30861](https://patchblox.com/security/data/fix/linux/debian-cve-2023-30861.md) | May 2, 2023 |
| Linux | flask Debian 14 | 2.2.2-3 | [DEBIAN-CVE-2023-30861](https://patchblox.com/security/data/fix/linux/debian-cve-2023-30861.md) | May 2, 2023 |
| Linux | python-flask-doc amzn 2023 | 1:1.1.2-5.amzn2023.0.3 | [ALAS2023-2023-183](https://patchblox.com/security/data/fix/linux/alas2023-2023-183.md) | May 25, 2023 |
| Linux | python3-flask Ubuntu 20.04 LTS (focal) | 1.1.1-2ubuntu0.1 | [python3-flask 1.1.1-2ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-python3-flask-1.1.1-2ubuntu0.1.md) | May 2, 2023 |
| Linux | python3-flask Ubuntu 22.04.1 LTS (jammy) | 2.0.1-2ubuntu1.1 | [python3-flask 2.0.1-2ubuntu1.1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-python3-flask-2.0.1-2ubuntu1.1.md) | May 2, 2023 |
| Linux | python3-flask amzn 2023 | 1:1.1.2-5.amzn2023.0.3 | [ALAS2023-2023-183](https://patchblox.com/security/data/fix/linux/alas2023-2023-183.md) | May 25, 2023 |
| Linux | python3-flask ol 8 | 1:0.12.2-4.0.1.el8 | [ELSA-2023-12710](https://patchblox.com/security/data/fix/linux/elsa-2023-12710.md) | Aug 6, 2023 |

---

Data as of 2026-11-09T19:38:12Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
