Insertion of Sensitive Information into Externally-Accessible File or Directory Affecting flask-security package, versions [,5.5.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

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

Introduced: 1 Sep 2024

CVE NOT AVAILABLE CWE-538 Open this link in a new tab

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.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.9 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    High
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Active
  • Confidentiality (VC)
    High
  • Integrity (VI)
    Low
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None