Insertion of Sensitive Information into Externally-Accessible File or Directory Affecting flask-security package, versions [,5.5.1)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-PYTHON-FLASKSECURITY-7856166
- published 2 Sep 2024
- disclosed 1 Sep 2024
- credit nerrixde
How to fix?
Upgrade Flask-Security
to version 5.5.1 or higher.
Overview
Flask-Security is a Simple security for Flask apps.
Affected versions of this package are vulnerable to Insertion of Sensitive Information into Externally-Accessible File or Directory. A GET request to /tf-qrcode
returns the QR code without requiring a CSRF token. If other security measures, such as CORS, fail, an attacker could load this image on a third-party site visited by a logged-in user, allowing them to obtain the TOTP secret and generate valid 2FA codes in the future, as the secret does not change.