Skip to content

chore(deps): update dependency flask to v2.2.5 [security]#14249

Open
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/pypi-flask-vulnerability
Open

chore(deps): update dependency flask to v2.2.5 [security]#14249
renovate-bot wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
renovate-bot:renovate/pypi-flask-vulnerability

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
Flask (changelog) ==2.2.2==2.2.5 age confidence
Flask (changelog) ==1.1.4==2.2.5 age confidence

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

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

More information

Details

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.
  3. The application does not access or modify the session at any point during a request.
  4. SESSION_REFRESH_EACH_REQUEST 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 refreshed (re-sent to update the expiration) without being accessed or modified.

Severity

  • CVSS Score: 8.7 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

pallets/flask (Flask)

v2.2.5

Compare Source

Released 2023-05-02

  • Update for compatibility with Werkzeug 2.3.3.
  • Set Vary: Cookie header when the session is accessed, modified, or refreshed.

v2.2.4

Compare Source

Released 2023-04-25

  • Update for compatibility with Werkzeug 2.3.

v2.2.3

Compare Source

Released 2023-02-15

  • Autoescape is enabled by default for .svg template files. :issue:4831
  • Fix the type of template_folder to accept pathlib.Path. :issue:4892
  • Add --debug option to the flask run command. :issue:4777

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team and chalmerlowe as code owners May 29, 2026 20:09
@trusted-contributions-gcf trusted-contributions-gcf Bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 29, 2026
@product-auto-label product-auto-label Bot added samples Issues that are directly related to samples. api: appengine Issues related to the App Engine Admin API API. api: bigquery Issues related to the BigQuery API. api: cloudfunctions Issues related to the Cloud Run functions API. api: cloudsql api: recaptchaenterprise Issues related to the reCAPTCHA API. labels May 29, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 29, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades the Flask dependency to version 2.2.5 across multiple requirements files. However, upgrading Flask in the appengine/flexible/websockets directory will break the application due to an incompatibility between Flask 2.0+ and the unmaintained Flask-Sockets library. It is recommended to exclude this directory from the upgrade or migrate to a maintained alternative like Flask-Sock.

@@ -1,4 +1,4 @@
Flask==1.1.4 # it seems like Flask-sockets doesn't play well with 2.0+
Flask==2.2.5 # it seems like Flask-sockets doesn't play well with 2.0+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Upgrading Flask to 2.2.5 in this directory will break the application. As noted in the inline comment, Flask-Sockets is incompatible with Flask 2.0+ because it relies on internal APIs that were removed or changed. Since Flask-Sockets is unmaintained, you should exclude this directory from the Flask upgrade or migrate the sample to a maintained library like Flask-Sock before upgrading.

Flask==1.1.4 # it seems like Flask-sockets doesn't play well with 2.0+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: appengine Issues related to the App Engine Admin API API. api: bigquery Issues related to the BigQuery API. api: cloudfunctions Issues related to the Cloud Run functions API. api: cloudsql api: recaptchaenterprise Issues related to the reCAPTCHA API. owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants