Skip to content

← Public intelligence

PyPI package

flask

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

5 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Low, CVSS 2.3PyPIAmendedPublished

    Flask session does not add Vary: Cookie header when accessed in some ways

    CVE-2026-27205 · GHSA-68rp-wp8r-4726

    Affected
    • PyPI flask < 3.1.3
    Fixed in
    3.1.3· Vendor fix available
    Issue
    When the session object is accessed, Flask should set the Vary: Cookie header. This instructs caches not to cache the response, as it may contain information specific to a logged in user. This is handled in most cases, but some forms of access such as the Python in operator were overlooked. The severity depends on the application's use of the session, and the cache'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 ignore responses with cookies. 2. The application does not set a Cache-Control header to indicate that a page is private or should not be cached. 3. The application accesses the session in a way that does not access the values, only the keys, and does not mutate the session.

    Recommended action: Upgrade to 3.1.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Low, CVSS 1.8PyPIAmendedPublished

    Flask uses fallback key instead of current signing key

    CVE-2025-47278 · GHSA-4grg-w6v8-c28g

    Affected
    • PyPI flask >= 3.1.0, <= 3.1.0
    Fixed in
    3.1.1· Vendor fix available
    Issue
    In Flask 3.1.0, the way fallback key configuration was handled resulted in the last fallback key being used for signing, rather than the current signing key. Signing is provided by the itsdangerous library. A list of keys can be passed, and it expects the last (top) key in the list to be the most recent key, and uses that for signing. Flask was incorrectly constructing that list in reverse, passing the signing key first. Sites that have opted-in to use key rotation by setting SECRETKEYFALLBACKS are likely to unexpectedly be signing their sessions with stale keys, and their transition to fresher keys will be impeded. Sessions are still signed, so this would not cause any sort of data integrity loss.

    Recommended action: Upgrade to 3.1.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. High, CVSS 8.7PyPIAmendedPublished

    Flask vulnerable to possible disclosure of permanent session cookie due to missing Vary: Cookie header

    CVE-2023-30861 · GHSA-m2qf-hxjv-5gpq

    Affected
    • PyPI flask >= 2.3.0, < 2.3.2; < 2.2.5
    Fixed in
    2.3.22.2.5· Vendor fix available
    Issue
    When all of the following conditions are met, a response containing data intended for one client may be cached and subsequently sent by a 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. 2. The application does not access or modify the session at any point during a request. 4. SESSIONREFRESHEACHREQUEST is 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…

    Recommended action: Upgrade to 2.3.2 or 2.2.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 8.7PyPIAmendedPublished

    Pallets Project Flask is vulnerable to Denial of Service via Unexpected memory usage

    CVE-2019-1010083 · GHSA-5wv5-4vpf-pj6m

    Affected
    • PyPI flask < 1.0
    Fixed in
    1.0· Vendor fix available
    Issue
    The Pallets Project Flask before 1.0 is affected by unexpected memory usage. The impact is denial of service. The attack vector is crafted encoded JSON data. The fixed version is 1. NOTE this may overlap CVE-2018-1000656.

    Recommended action: Upgrade to 1.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. High, CVSS 8.7PyPIAmendedPublished

    Flask is vulnerable to Denial of Service via incorrect encoding of JSON data

    CVE-2018-1000656 · GHSA-562c-5r94-xh97

    Affected
    • PyPI flask < 0.12.3
    Fixed in
    0.12.3· Vendor fix available
    Issue
    The Pallets Project flask version Before 0.12.3 contains a CWE-20: Improper Input Validation vulnerability in flask that can result in Large amount of memory usage possibly leading to denial of service. This attack appear to be exploitable via Attacker provides JSON data in incorrect encoding. This vulnerability appears to have been fixed in 0.12.3.

    Recommended action: Upgrade to 0.12.3 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →