{"answers":{"affected":"5 open source packages ship an affected version, including flask and Flask. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-30861 in the wild and no public exploit code.","fix":"Upgrade flask to a fixed version for your release line: 2.2.5 or 2.3.2.","what":"CVE-2023-30861 is a high-severity vulnerability in pallets flask, published on 2 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-30861 and fix it if it is affected.\n\nWhat it is: CVE-2023-30861 is a high-severity vulnerability in pallets flask, published on 2 May 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-30861 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- flask (PyPI): affected all versions; fixed in 2.2.5, 2.3.2\n- flask (PyPI): affected all versions; fixed in 2.2.5\n- flask (PyPI): affected from 2.3.0; fixed in 2.3.2\n- Flask (PyPI): affected all versions; fixed in 2.2.5\n- Flask (PyPI): affected from 2.3.0; fixed in 2.3.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-30861/ (Markdown: https://insights.sbomify.com/CVE-2023-30861/index.md)","id":"CVE-2023-30861","markdown":"https://insights.sbomify.com/CVE-2023-30861/index.md","name":"CVE-2023-30861","record":{"aliases":["AZL-43798","AZL-44718","CLSA-2026-1772410250","CLSA-2026-1772410251","DEBIAN-CVE-2023-30861","DLA-3536-1","DSA-5442-1","GHSA-m2qf-hxjv-5gpq","MGASA-2023-0193","OESA-2023-1922","OESA-2023-1936","PYSEC-2023-62","RHSA-2023:3440","RHSA-2023:3444","RHSA-2023:3446","RHSA-2023:3525","ROOT-APP-PYPI-CVE-2023-30861","SUSE-SU-2023:2263-1","SUSE-SU-2023:2263-2","SUSE-SU-2023:2264-1","UBUNTU-CVE-2023-30861","USN-6111-1","openSUSE-SU-2024:12923-1","openSUSE-SU-2026:11902-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Flask web framework","requires_auth":"none","summary":"Attackers can steal session cookies via caching proxies if Flask sessions are permanent and not accessed, leading to potential account takeover.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"flask","vendor":"palletsprojects"}],"cvss":{"score":7.5,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-539","name":"Use of Persistent Cookies Containing Sensitive Information"}],"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.","ecosystems":["PyPI","Red Hat:openstack:16.1::el8","Red Hat:openstack:16.2::el8","Red Hat:openstack:17.0::el9","Red Hat:rhel_extras_other:7","SUSE:Enterprise Storage 7","SUSE:Enterprise Storage 7.1","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","SUSE:Linux Enterprise Module for Basesystem 15 SP4","SUSE:Linux Enterprise Module for Basesystem 15 SP5","SUSE:Linux Enterprise Module for Package Hub 15 SP4","SUSE:Linux Enterprise Module for Package Hub 15 SP5","SUSE:Linux Enterprise Real Time 15 SP3","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server 15 SP2-LTSS","SUSE:Linux Enterprise Server 15 SP3-LTSS","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","SUSE:Linux Enterprise Server for SAP Applications 15 SP2","SUSE:Linux Enterprise Server for SAP Applications 15 SP3","SUSE:Manager Proxy 4.2","SUSE:Manager Server 4.2","openSUSE:Leap 15.4","openSUSE:Leap 15.5","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2025-04-25","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-04-25T06:59:02Z","kind":"github_poc","ref":"https://github.com/fromitive/cve-2023-30861-poc","stars":0,"title":"Flask CVE-2023-30861 Poc 환경구축"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header","id":"CVE-2023-30861","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2023"},"n_packages":34,"n_references":8,"next":{"headline":"Missing authorization in SC9863A/SC9832E/SC7731E/T610/T310/T606/T760/T610/T618/T606/T612/T616/T760/T770/T820/S8000","id":"CVE-2023-30863"},"packages":[{"ecosystem":"PyPI","fixed":["2.2.5"],"introduced":["0"],"last_affected":[],"package":"Flask","purl":null,"source":"GHSA-m2qf-hxjv-5gpq"},{"ecosystem":"PyPI","fixed":["2.3.2"],"introduced":["2.3.0"],"last_affected":[],"package":"Flask","purl":null,"source":"GHSA-m2qf-hxjv-5gpq"},{"ecosystem":"PyPI","fixed":["2.2.5","2.3.2"],"introduced":["0","2.3.0"],"last_affected":[],"package":"flask","purl":"pkg:pypi/flask","source":"PYSEC-2023-62"},{"ecosystem":"PyPI","fixed":["2.2.5"],"introduced":["0"],"last_affected":[],"package":"flask","purl":"pkg:pypi/flask","source":"GHSA-m2qf-hxjv-5gpq"},{"ecosystem":"PyPI","fixed":["2.3.2"],"introduced":["2.3.0"],"last_affected":[],"package":"flask","purl":"pkg:pypi/flask","source":"GHSA-m2qf-hxjv-5gpq"},{"ecosystem":"Red Hat:openstack:16.1::el8","fixed":["1:1.0.2-8.el8ost"],"introduced":["0"],"last_affected":[],"package":"python-flask","purl":"pkg:rpm/redhat/python-flask","source":"RHSA-2023:3446"},{"ecosystem":"Red Hat:openstack:16.1::el8","fixed":["1:1.0.2-8.el8ost"],"introduced":["0"],"last_affected":[],"package":"python3-flask","purl":"pkg:rpm/redhat/python3-flask","source":"RHSA-2023:3446"},{"ecosystem":"Red Hat:openstack:16.2::el8","fixed":["1:1.0.2-8.el8ost"],"introduced":["0"],"last_affected":[],"package":"python-flask","purl":"pkg:rpm/redhat/python-flask","source":"RHSA-2023:3444"},{"ecosystem":"Red Hat:openstack:16.2::el8","fixed":["1:1.0.2-8.el8ost"],"introduced":["0"],"last_affected":[],"package":"python3-flask","purl":"pkg:rpm/redhat/python3-flask","source":"RHSA-2023:3444"},{"ecosystem":"Red Hat:openstack:17.0::el9","fixed":["1:1.1.2-6.el9ost"],"introduced":["0"],"last_affected":[],"package":"python-flask","purl":"pkg:rpm/redhat/python-flask","source":"RHSA-2023:3440"},{"ecosystem":"Red Hat:openstack:17.0::el9","fixed":["1:1.1.2-6.el9ost"],"introduced":["0"],"last_affected":[],"package":"python3-flask","purl":"pkg:rpm/redhat/python3-flask","source":"RHSA-2023:3440"},{"ecosystem":"Red Hat:rhel_extras_other:7","fixed":["1:0.10.1-7.el7_9"],"introduced":["0"],"last_affected":[],"package":"python-flask","purl":"pkg:rpm/redhat/python-flask","source":"RHSA-2023:3525"},{"ecosystem":"SUSE:Enterprise Storage 7","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Enterprise%20Storage%207","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Enterprise Storage 7.1","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Enterprise%20Storage%207.1","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP4","fixed":["1.0.4-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4","source":"SUSE-SU-2023:2263-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Basesystem 15 SP5","fixed":["1.0.4-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5","source":"SUSE-SU-2023:2263-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP4","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP4","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP5","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP5","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Real Time 15 SP3","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Real%20Time%2015%20SP3","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP1-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP2-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP3-LTSS","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSS","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP1","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP2","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP3","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Manager Proxy 4.2","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Manager%20Proxy%204.2","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"SUSE:Manager Server 4.2","fixed":["1.0.2-150100.6.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/suse/python-Flask\u0026distro=SUSE%20Manager%20Server%204.2","source":"SUSE-SU-2023:2264-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["1.0.4-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/opensuse/python-Flask\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:2263-1"},{"ecosystem":"openSUSE:Leap 15.5","fixed":["1.0.4-150400.3.3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/opensuse/python-Flask\u0026distro=openSUSE%20Leap%2015.5","source":"SUSE-SU-2023:2263-2"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["3.1.3-3.1"],"introduced":["0"],"last_affected":[],"package":"python-Flask","purl":"pkg:rpm/opensuse/python-Flask\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:11902-1"}],"prev":{"headline":"WWBN/AVideo stored XSS vulnerability leads to takeover of any user's account, including admin's account","id":"CVE-2023-30860"},"products":["flask"],"published":"2023-05-02","related":[{"cvss_score":7.5,"headline":"Pallets Project Flask is vulnerable to Denial of Service via Unexpected memory usage","id":"CVE-2019-1010083","kev_date_added":null,"published":"2019-07-17"},{"cvss_score":2.3,"headline":"Flask session does not add `Vary: Cookie` header when accessed in some ways","id":"CVE-2026-27205","kev_date_added":null,"published":"2026-02-21"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["pallets"]},"summary":"Attackers can steal session cookies via caching proxies if Flask sessions are permanent and not accessed, leading to potential account takeover.","url":"https://insights.sbomify.com/CVE-2023-30861/"}