cve.bz

CVE-2023-30861 palletsprojects flask

7.5 highEPSS 1.2%Fix available

High (7.5) in palletsprojects flask. EPSS 1.2% estimated probability of exploitation activity in the next 30 days. Fixed in flask 2.2.5, 2.3.2.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
1.2% (unchanged from 1.2% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 70th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-01-30. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-539 Use of Persistent Cookies Containing Sensitive Information
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-30861 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-30861?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-30861?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-30861 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
palletsprojects:flaskbefore 2.2.5
palletsprojects:flaskfrom 2.3.0 before 2.3.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m2qf-hxjv-5gpqPyPIflask>=2.3.0 <2.3.22.3.2
GHSA-m2qf-hxjv-5gpqPyPIflask<2.2.52.2.5
PYSEC-2023-62PyPIflask<2.2.5
>=2.3.0 <2.3.2
2.2.5, 2.3.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10flask1.0.2-3+deb10u1DLA-3536-1
Debian11flask1.1.2-2+deb11u1DSA-5442-1
Debian12, 13, 14flask2.2.2-3DEBIAN-CVE-2023-30861
Ubuntu20.04:LTSflask1.1.1-2ubuntu0.1UBUNTU-CVE-2023-30861 USN-6111-1
Ubuntu22.04:LTSflask2.0.1-2ubuntu1.1UBUNTU-CVE-2023-30861 USN-6111-1
Red Hatopenshift:4.11::el8cri-o, cri-o-debuginfo, cri-o-debugsource0:1.24.5-5.rhaos4.11.git8bf967b.el8RHSA-2023:3541
Red Hatopenshift:4.12::el8podman, podman-tests, podman-docker and 10 more3:4.2.0-4.1.rhaos4.12.el8RHSA-2023:3545
Red Hatopenshift:4.13::el8cri-o, cri-o-debuginfo, cri-o-debugsource0:1.26.3-8.rhaos4.13.git9232b13.el8RHSA-2023:3536
Red Hatopenshift:4.13::el8openshift, openshift-hyperkube0:4.13.0-202305312300.p0.g7a891f0.assembly.stream.el8RHSA-2023:3536
Red Hatopenshift:4.13::el8openshift-ansible, openshift-ansible-test0:4.13.0-202305301841.p0.g148be47.assembly.stream.el8RHSA-2023:3536
Red Hatopenshift:4.13::el8openshift-clients, openshift-clients-redistributable0:4.13.0-202305312300.p0.g05d83ef.assembly.stream.el8RHSA-2023:3536
Red Hatopenshift:4.13::el9NetworkManager, NetworkManager-ovs, NetworkManager-ppp and 25 more1:1.42.2-2.el9_2RHSA-2023:3536
Red Hatopenshift:4.13::el9conmon, conmon-debuginfo, conmon-debugsource3:2.1.7-1.1.rhaos4.13.el9RHSA-2023:3536
Red Hatopenshift:4.13::el9cri-o, cri-o-debuginfo, cri-o-debugsource0:1.26.3-9.rhaos4.13.git9232b13.el9RHSA-2023:3536
Red Hatopenshift:4.13::el9openshift, openshift-hyperkube0:4.13.0-202305312300.p0.g7a891f0.assembly.stream.el9RHSA-2023:3536
Red Hatopenshift:4.13::el9openshift-ansible, openshift-ansible-test0:4.13.0-202305301841.p0.g148be47.assembly.stream.el9RHSA-2023:3536
Red Hatopenshift:4.13::el9openshift-clients, openshift-clients-redistributable0:4.13.0-202305312300.p0.g05d83ef.assembly.stream.el9RHSA-2023:3536
7 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 7, Enterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP1-LTSS and 14 morepython-Flask1.0.2-150100.6.3.1SUSE-SU-2023:2264-1
SUSELinux Enterprise Module for Basesystem 15 SP4, Linux Enterprise Module for Basesystem 15 SP5python-Flask1.0.4-150400.3.3.1SUSE-SU-2023:2263-1
openSUSELeap 15.4python-Flask1.0.4-150400.3.3.1SUSE-SU-2023:2263-1
openSUSELeap 15.5python-Flask1.0.4-150400.3.3.1SUSE-SU-2023:2263-2
openSUSETumbleweedpython-Flask3.1.3-3.1openSUSE-SU-2026:11902-1
Azure Linux2python-flaskno fix listedAZL-43798
Azure Linux3python-flaskno fix listedAZL-44718

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
Ironic content for Red Hat OpenShift Container Platform 4.11python-flask-1:1.1.2-6.el8Fixed 2023-06-14RHSA-2023:3541
Ironic content for Red Hat OpenShift Container Platform 4.12python-flask-1:2.0.1-3.el9Fixed 2023-06-14RHSA-2023:3545
Ironic content for Red Hat OpenShift Container Platform 4.13python-flask-2:2.0.1-4.el9.2Fixed 2023-06-13RHSA-2023:3536
Red Hat Enterprise Linux 7 Extraspython-flask-1:0.10.1-7.el7_9Fixed 2023-06-07RHSA-2023:3525
Red Hat OpenStack Platform 16.1python-flask-1:1.0.2-8.el8ostFixed 2023-06-05RHSA-2023:3446
Red Hat OpenStack Platform 16.2python-flask-1:1.0.2-8.el8ostFixed 2023-06-05RHSA-2023:3444
Red Hat OpenStack Platform 17.0python-flask-1:1.1.2-6.el9ostFixed 2023-06-05RHSA-2023:3440
Red Hat Quay 3quay/quay-rhel8:v3.10.0-150Fixed 2023-11-30RHSA-2023:7341
Red Hat Ceph Storage 3python-flaskOut of support scope
Red Hat Ceph Storage 7python-flaskNot affected
Red Hat Enterprise Linux 8python-flaskAffected
Red Hat Storage 3python-flaskAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-30861.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • elisapresciutti/CVE-2023-30861-flask-lab 0 stars, Python, created
    Educational Docker lab reproducing CVE-2023-30861 (Flask session cookie disclosure via missing Vary: Cookie), with exploit, patch verificat…

Attack patterns (CAPEC)

  • CAPEC-21 Exploitation of Trusted Identifiers Likelihood: High · Severity: High
  • CAPEC-31 Accessing/Intercepting/Modifying HTTP Cookies Likelihood: High · Severity: High
  • CAPEC-39 Manipulating Opaque Client-based Data Tokens Likelihood: High · Severity: Medium
  • CAPEC-59 Session Credential Falsification through Prediction Likelihood: High · Severity: High
  • CAPEC-60 Reusing Session IDs (aka Session Replay) Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON