CVE-2021-21241 CSRF can expose users authentication token in Flask-Security-Too
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- Debian
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.
Upgrade path
6 packages: 5 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/flask-security(Debian 12) | < 4.0.0-1 | 4.0.0-1 | Fixed |
| debian/flask-security(Debian 13) | < 4.0.0-1 | 4.0.0-1 | Fixed |
| debian/flask-security(Debian 14) | < 4.0.0-1 | 4.0.0-1 | Fixed |
| flask-security-too project flask-security-too | >= 3.3.0, < 3.4.5 | 3.4.5 | Fixed |
| pypi flask-security-too(PyPI) | = 3.3.0; = 3.3.1; = 3.3.2; = 3.3.3 +6 more | 3.4.5 | Fixed |
| Flask-Middleware flask-security-too | = >= 3.3.0, < 3.4.5 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi flask-security-too(PyPI) | >= 3.3.0, < 3.4.5 | 3.4.5 |
| pypi flask-security-too(PyPI) | = 3.3.0 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.3.1 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.3.2 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.3.3 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.4.0 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.4.1 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.4.2 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.4.3 | No fix listed |
| pypi flask-security-too(PyPI) | = 3.4.4 | No fix listed |
| debian/flask-security(Debian:12) | < 4.0.0-1 | 4.0.0-1 |
| debian/flask-security(Debian:13) | < 4.0.0-1 | 4.0.0-1 |
| debian/flask-security(Debian:14) | < 4.0.0-1 | 4.0.0-1 |
| flask-security-too project flask-security-too | >= 3.3.0, < 3.4.5 | 3.4.5 |
| Flask-Middleware flask-security-too | = >= 3.3.0, < 3.4.5 | No fix listed |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- pypi.org product third-party-advisory
- web.archive.org
- web.archive.org
- web.archive.org
- web.archive.org
- web.archive.org
- github.com third-party-advisory
- github.com patch third-party-advisory
- github.com third-party-advisory vendor-advisory
- github.com patch third-party-advisory
- github.com patch third-party-advisory
- github.com
- Debian Security Tracker CVE-2021-21241 vendor-advisory
- bugs.debian.org issue-tracking