Vulnerability · Published Aug 2, 2022 · Assigned by snyk
CVE-2021-23385Open Redirect
Medium 5.4
In plain English
A medium-severity security flaw in Flask-Security. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 69% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | flask-security | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| Debian:13 | flask-security | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| Debian:14 | flask-security | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| PyPI | flask-security | no fix listed | GHSA-cg8c-gc2j-2wf7 |
| PyPI | flask-security | 5.5.1 | PYSEC-2026-809 |
| Ubuntu:22.04:LTS | flask-security | 4.0.0-1ubuntu0.1 | USN-6792-1 |
| Ubuntu:22.04:LTS | flask-security | 4.0.0-1ubuntu0.1 | UBUNTU-CVE-2021-23385 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | Flask-Security | 0 – before unspecified |