{"cve":"CVE-2023-30861","nvd":{"published":"2023-05-02T18:15:52.373","modified":"2026-06-17T05:55:47.853","status":"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.\n\n1. The application must be hosted behind a caching proxy that does not strip cookies or ignore responses with cookies.\n2. The application sets `session.permanent = True`\n3. The application does not access or modify the session at any point during a request.\n4. `SESSION_REFRESH_EACH_REQUEST` enabled (the default).\n5. The application does not set a `Cache-Control` header to indicate that a page is private or should not be cached.\n\nThis 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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5},"cwes":["CWE-539"],"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"],"products":["palletsprojects:flask"],"source":"nvd","synced_at":"2026-10-19T21:38:05.473481323+00:00"},"epss":{"cve":"CVE-2023-30861","score":0.0125,"percentile":0.69404,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m2qf-hxjv-5gpq","url":"https://osv.dev/vulnerability/GHSA-m2qf-hxjv-5gpq","summary":"Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header","modified":"2026-09-10T03:50:01.763387498Z","packages":[{"ecosystem":"PyPI","name":"flask","purl":"pkg:pypi/flask","ranges":[">=2.3.0 <2.3.2"],"fixed":["2.3.2"]},{"ecosystem":"PyPI","name":"flask","purl":"pkg:pypi/flask","ranges":["<2.2.5"],"fixed":["2.2.5"]}]},{"id":"PYSEC-2023-62","url":"https://osv.dev/vulnerability/PYSEC-2023-62","summary":"","modified":"2023-11-08T04:12:28.231927Z","packages":[{"ecosystem":"PyPI","name":"flask","purl":"pkg:pypi/flask","ranges":["<2.2.5",">=2.3.0 <2.3.2"],"fixed":["2.2.5","2.3.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}