CVE-2021-23385 Open Redirect
Attackers can redirect users to malicious sites via bypassed URL validation in Flask-Security when using non-default WSGI configurations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-23385?
CVE-2021-23385 is a medium-severity vulnerability in Flask-Security, published on 2 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
This affects all versions of package Flask-Security. When using the get_post_logout_redirect and get_post_login_redirect functions, it is possible to bypass URL validation and redirect a user to an arbitrary URL by providing multiple back slashes such as \\\evil.com/path. This vulnerability is only exploitable if an alternative WSGI server other than Werkzeug is used, or the default behaviour of Werkzeug is modified using 'autocorrect_location_header=False. **Note:** Flask-Security is not maintained anymore.
Weakness: CWE-601
Which versions are affected by CVE-2021-23385?
3 open source packages ship an affected version, including flask-security and Flask-Security. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
flask-security PyPI | All versions to 3.0.0 | None |
flask-security PyPI | All versions | 5.5.1 |
Flask-Security PyPI | All versions to 3.0.0 | None |
Linux distribution packages (6)
python-Flask-Security-Too SUSE:Linux Enterprise Module for Basesystem 15 SP3 | All versions | 3.4.2-150200.3.6.1 |
python-Flask-Security-Too SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 3.4.2-150200.3.6.1 |
python-Flask-Security openSUSE:Leap 15.3 | All versions | 3.0.0-150100.4.3.1 |
python-Flask-Security-Too openSUSE:Leap 15.3 | All versions | 3.4.2-150200.3.6.1 |
python-Flask-Security openSUSE:Leap 15.4 | All versions | 3.0.0-150100.4.3.1 |
python-Flask-Security-Too openSUSE:Leap 15.4 | All versions | 3.4.2-150200.3.6.1 |
Products include Flask-Security Project Flask-Security.
How do I fix CVE-2021-23385?
Upgrade flask-security to 5.5.1 or later.
Is CVE-2021-23385 being exploited?
There is no known exploitation of CVE-2021-23385 in the wild and no public exploit code.
Other vulnerabilities in Flask-Security
Sources
Also known as DEBIAN-CVE-2021-23385, DLA-3545-1, GHSA-cg8c-gc2j-2wf7, MGASA-2023-0105, PYSEC-2026-809, SUSE-SU-2022:3834-1 and 3 more.