CVE-2025-47278 Details
Description
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.
A vulnerability in Flask version 3.1.0 allows for improper management of fallback keys used in session signing. The issue arises because the framework reverses the order of key prioritization, leading to the last fallback key being used for signing instead of the current key. This misconfiguration affects sites that have enabled key rotation through the `SECRET_KEY_FALLBACKS` setting, causing them to inadvertently sign sessions with outdated keys. As a result, the transition to newer keys is disrupted, although it is important to note that session signing remains intact, preventing any loss of data integrity.
Users can upgrade to Flask version 3.1.1, which addresses this vulnerability by correcting the order in which keys are applied for signing.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed May 13, 2025CISA-ADP
Assessed May 13, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pallets/flask/commit/73d6504063bfa00666a92b07a28aaf906c532f09 | [email protected] | Source CodeVendor |
| https://github.com/pallets/flask/releases/tag/3.1.1 | [email protected] | Release NotesVendor |
| https://github.com/pallets/flask/security/advisories/GHSA-4grg-w6v8-c28g | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-683 | Function Call With Incorrect Order of Arguments | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Flask | 3.1.0 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 13, 2025 | New CVE Received | [email protected] |
Volerion