Function Call With Incorrect Order of Arguments Affecting flask package, versions <3.1.0-2ubuntu1.1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.02% (3rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2504-FLASK-10167560
  • published4 Jul 2025
  • disclosed13 May 2025

Introduced: 13 May 2025

CVE-2025-47278  (opens in a new tab)
CWE-683  (opens in a new tab)

How to fix?

Upgrade Ubuntu:25.04 flask to version 3.1.0-2ubuntu1.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream flask package and not the flask package as distributed by Ubuntu. See How to fix? for Ubuntu:25.04 relevant fixed versions and status.

Flask is a web server gateway interface (WSGI) web application framework. 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 SECRET_KEY_FALLBACKS care 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. Version 3.1.1 contains a patch for the issue.

CVSS Base Scores

version 3.1