Vulnerability · Published May 13, 2025 · Assigned by GitHub_M

CVE-2025-47278Flask uses fallback key instead of current signing key

Low 1.8

In plain English

A low-severity security flaw in flask from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)1.8Low
Exploit odds (30 days)0.2%top 91.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13flask3.1.1-1DEBIAN-CVE-2025-47278
Debian:14flask3.1.1-1DEBIAN-CVE-2025-47278
PyPIflask3.1.1GHSA-4grg-w6v8-c28g
PyPIflask3.1.1PYSEC-2026-1377

Affected products (as reported)

VendorProductVersions
pallets flask = 3.1.0

Weakness: CWE-683 · Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

References