CVE-2021-23385Open Redirect
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.
What to do
Fixed builds are available from Debian, PyPI, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | flask-security | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | flask-security | Fixed | 4.0.0-1ubuntu0.1 | UBUNTU-CVE-2021-23385 |
| Ubuntu 20.04 | flask-security | Fixed | 1.7.5-2ubuntu0.20.04.1 | UBUNTU-CVE-2021-23385 |
| Ubuntu 18.04 | flask-security | Fix pending | 1.7.5-2ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2021-23385 |
| Debian 14 | flask-security | Fixed | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| Debian 13 | flask-security | Fixed | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| Debian 12 | flask-security | Fixed | 5.0.2-1 | DEBIAN-CVE-2021-23385 |
| PyPI library | flask-security | Fixed | 5.5.1 | PYSEC-2026-809 |
What the vendor says
As published in the CVE record by snyk, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Flask-Security: affected: before unspecified
References
- https://security.snyk.io/vuln/SNYK-PYTHON-FLASKSECURITY-1293234
- https://github.com/mattupstate/flask-security
- https://snyk.io/blog/url-confusion-vulnerabilities/
- https://lists.debian.org/debian-lts-announce/2023/08/msg00034.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.