Skip to content
Fencer Vulns
high 7.4

CVE-2021-21241 json

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

published 2021-01-11 5 y ago modified 2026-06-17 4 mo ago also GHSA-hh7m-rx4f-4vpv , PYSEC-2021-91 , EUVD-2021-0087

cvss
7.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.9%
EPSS 0.9% chance of exploitation in 30 days, percentile 60%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi flask-security-too 3.4.5
  • flask-security-too_project flask-security-too 3.4.5
  • flask-security Debian 14, Debian 13, Debian 12 4.0.0-1

debian advisories DEBIAN-CVE-2021-21241

  • python-Flask-Security-Too SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +10 more 3.4.2-150200.3.3.1

suse advisories SUSE-SU-2022:3093-1

  • python-Flask-Security openSUSE Tumbleweed 5.5.2-1.1

opensuse advisories openSUSE-SU-2024:14555-1

  • python-flask-security-too Arch Linux 4.0.1-1

arch linux advisories AVG-1434

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-21241 updated cvss 7.4

python-flask-security: unprotected GET requests could lead to malicious party obtaining the authentication token

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.93% chance of exploitation in the next 30 days, higher than 60% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
NVD 3.1 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:P/I:N/A:N
GitHub 3.1 7.4 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Affected packages

ecosystem package affected fixed in
pypi flask-security-too
>=3.3.0, <3.4.5
3.4.5

Affected products

  • Flask-Middleware flask-security-too

Classification

Weakness
  • CWE-352 Cross-Site Request Forgery

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.