Red Hat VEX
RHVEX-CVE-2023-30861
flask: Possible disclosure of permanent session cookie due to missing Vary: Cookie header
Details
A flaw was found in the Python Flask package. A cached response may contain data for one client sent by a proxy to other clients, including session cookies, resulting in the compromise of data confidentiality contained in the leak requests or cookies. This happens when the following conditions are met by the proxy's behavior regarding cookies and the application's behavior session usage:
- The caching proxy does not strip or ignore response with cookies
- The application sets a permanent session
- The application does not access or modify the session during requests
- SESSION_REFRESH_EACH_REQUEST is enabled, which is the default Flask behavior
- The application does not set the Cache-Control header to avoid being cached
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:8 | python3-flask | All versions, no fix yet |
References
- https://access.redhat.com/security/cve/CVE-2023-30861
- https://bugzilla.redhat.com/show_bug.cgi?id=2196643
- https://www.cve.org/CVERecord?id=CVE-2023-30861
- https://nvd.nist.gov/vuln/detail/CVE-2023-30861
- https://github.com/pallets/flask/commit/70f906c51ce49c485f1d355703e9cc3386b1cc2b
- https://github.com/pallets/flask/security/advisories/GHSA-m2qf-hxjv-5gpq