CVE-2021-21241

CSRF can expose users authentication token in Flask-Security-Too

HIGH
7.4
CVSS Score
Published: January 11, 2021 at 08:35 PM UTC
Updated: June 17, 2026 at 03:35 AM UTC
2 products affected across 2 vendorsFlask Security TooSecurity Too Project Flask Security Too

Using flask-security-too by Flask-Middleware?

Get instant alerts when new vulnerabilities affect flask-security-too - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.4
Exploit prediction
EPSS 0.9%

Description

The Python "Flask-Security-Too" package is used for adding security features to your Flask application. It is an is a independently maintained version of Flask-Security based on the 3.0.0 version of Flask-Security. In Flask-Security-Too from version 3.3.0 and before version 3.4.5, the /login and /change endpoints can return the authenticated user's authentication token in response to a GET request. Since GET requests aren't protected with a CSRF token, this could lead to a malicious 3rd party site acquiring the authentication token. Version 3.4.5 and version 4.0.0 are patched. As a workaround, if you aren't using authentication tokens - you can set the SECURITY_TOKEN_MAX_AGE to "0" (seconds) which should make the token unusable.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.3.0 ≤ v < 3.4.5
Affected range stops below 3.4.5, so it looks safe — our inference, not a vendor statement
v < 3.4.5
Affected range stops below 3.4.5, so it looks safe — our inference, not a vendor statement

CVSS

7.4HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-352

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card