Advisory

GHSA-hh7m-rx4f-4vpv

Also known as: CVE-2021-21241, PYSEC-2021-91

Summary

CSRF can expose users authentication token

Details

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

Patches
Version 3.4.5 and soon to be released 4.0.0 are patched.

Workarounds
If you aren't using authentication tokens - you can set the SECURITY_TOKEN_MAX_AGE to "0" (seconds) which should make the token unusable.

References
None

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-01-11 20:38 UTC
Modified
2026-03-13 22:16 UTC

Affected packages and fixes

flask-security-too

PyPI · All systems

Affected

  • introduced 3.3.0, fixed 3.4.5 (ecosystem)

Fixed versions

3.4.5

Fix

  • Fixed version 3.4.5
    pip install --upgrade flask-security-too==3.4.5

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences