CVE-2025-47278Flask uses fallback key instead of current signing key
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.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | flask | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | flask | Not affected vulnerable_code_not_present | ||
| Debian 14 | flask | Fixed | 3.1.1-1 | DEBIAN-CVE-2025-47278 |
| Debian 13 | flask | Fixed | 3.1.1-1 | DEBIAN-CVE-2025-47278 |
| Red Hat Enterprise Linux 8 | python3-flask | Not affected | ||
| PyPI library | flask | Fixed | 3.1.1 | GHSA-4grg-w6v8-c28g |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- pallets flask: affected: = 3.1.0
References
- https://github.com/pallets/flask/security/advisories/GHSA-4grg-w6v8-c28g
- https://github.com/pallets/flask/commit/73d6504063bfa00666a92b07a28aaf906c532f09
- https://github.com/pallets/flask/releases/tag/3.1.1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.