NA

CVE-2023-30861

Published: 02/05/2023 Updated: 20/08/2023
CVSS v3 Base Score: 7.5 | Impact Score: 3.6 | Exploitability Score: 3.9
VMScore: 0

Vulnerability Summary

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.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

palletsprojects flask

Vendor Advisories

Debian Bug report logs - #1035932 CVE-2023-2088 / OSSA-2023-003: Unauthorized volume access through deleted volume attachments Package: src:python-os-brick; Maintainer for src:python-os-brick is Debian OpenStack <team+openstack@trackerdebianorg>; Reported by: Thomas Goirand <zigo@debianorg> Date: Thu, 11 May 2023 1 ...
Debian Bug report logs - #1035670 flask: CVE-2023-30861: Possible disclosure of permanent session cookie due to missing Vary: Cookie header Package: src:flask; Maintainer for src:flask is Debian Python Team <team+python@trackerdebianorg>; Reported by: Salvatore Bonaccorso <carnil@debianorg> Date: Sun, 7 May 2023 1 ...
It was discovered that in some conditions the Flask web framework may disclose a session cookie For the oldstable distribution (bullseye), this problem has been fixed in version 112-2+deb11u1 We recommend that you upgrade your flask packages For the detailed security status of flask please refer to its security tracker page at: securit ...
Synopsis Important: python-flask security update Type/Severity Security Advisory: Important Red Hat Insights patch analysis Identify and remediate systems affected by this advisory View affected systems Topic An update for python-flask is now available for Red Hat Enterprise Linux 7 ExtrasRed Hat Product Security has rated this up ...
Synopsis Important: Red Hat OpenStack Platform 161 (python-flask) security update Type/Severity Security Advisory: Important Red Hat Insights patch analysis Identify and remediate systems affected by this advisory View affected systems Topic An update for python-flask is now available for Red Hat OpenStack Platform161 (Train)Red ...
Synopsis Important: OpenShift Container Platform 41221 packages and security update Type/Severity Security Advisory: Important Red Hat Insights patch analysis Identify and remediate systems affected by this advisory View affected systems Topic Red Hat OpenShift Container Platform release 41221 is now available with updates to p ...
Synopsis Important: OpenShift Container Platform 4133 packages and security update Type/Severity Security Advisory: Important Red Hat Insights patch analysis Identify and remediate systems affected by this advisory View affected systems Topic Red Hat OpenShift Container Platform release 4133 is now available with updates to pac ...
Synopsis Important: Red Hat Quay security update Type/Severity Security Advisory: Important Topic An update is now available for Red Hat Quay 3Red Hat Product Security has rated this update as having a security impact of Important A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available f ...
DescriptionThe MITRE CVE dictionary describes this issue as: 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' ...

Github Repositories

Pulsecheck - Get current and historical vulnerability insights from the GItHub Advisory Database https://github.com/advisories/database, by checking the pulse of your project’s dependencies delivered in an easy-to-use CLI.

Pulsecheck I wrote Pulsecheck to serve as a tool for early-stage research on OSS third-party libraries and package vulnerabilities Pulsecheck parses your dependency files and queries the GitHub Advisory Database for all relevant GitHub-reviewed security advisories It will provide data on every reviewed GHSA advisory for your respective dependency This project showcases how t

Trivy scanning Dempo for security scanning in CI CD workflow using Trivy In the requiremnetstxt we are using the old version of flask ie Flask==201 which is causing CVE-2023-30861: Flask (METADATA) vulnerability To fix this we will update the requirementstxt file by adding Flask==232 To fix CVE-2022-40897 : setuptools (METAD

Explaining how to exploit CVE-2023-30861

Intro This bug happens because Flask doesn't tell the caching server (proxy) to be careful with sensitive information like cookies To use this attack you have to check your checklist User must use a proxy and accesses the flask webapp Proxy must be caching proxy (caching server) Flask version of the targeted flask website that user uses must be before 225 Attacker mus

dependabot_vulnerabilities_check docsgithubcom/ru/code-security/dependabot Example: Known security vulnerabilities detected Dependency flask Version < 225 Upgrade to ~> 225 Defined in Pipfile Vulnerabilities CVE-2023-30861 High severity