CVE-2021-23385 json
Open Redirect
published 2022-08-02 4 y ago modified 2026-07-07 4 mo ago also GHSA-cg8c-gc2j-2wf7 , PYSEC-2026-809 , EUVD-2022-7078
- cvss
- 5.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.2%
- EPSS 1.2% chance of exploitation in 30 days, percentile 69%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi flask-security 5.5.1
- flask-security Debian 14, Debian 13, Debian 12 5.0.2-1
debian advisories DEBIAN-CVE-2021-23385
- flask-security Ubuntu 20.04 LTS 1.7.5-2ubuntu0.20.04.1
- flask-security Ubuntu 22.04 LTS 4.0.0-1ubuntu0.1
- flask-security Ubuntu Pro 18.04 LTS 1.7.5-2ubuntu0.18.04.1~esm1
ubuntu advisories UBUNTU-CVE-2021-23385
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-Flask-Security-Too SLE Module for Basesystem 15 SP4, SLE Module for Basesystem 15 SP3, openSUSE Leap 15.4 +1 more 3.4.2-150200.3.6.1
- python-Flask-Security openSUSE Leap 15.4, openSUSE Leap 15.3 3.0.0-150100.4.3.1
suse advisories SUSE-SU-2022:3867-1SUSE-SU-2022:3834-1
- python-Flask-Security openSUSE Tumbleweed 5.5.2-1.1
opensuse advisories openSUSE-SU-2024:14555-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-23385 updated
python-flask-security: url validation bypass
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.25% chance of exploitation in the next 30 days, higher than 69% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- security.snyk.io https://security.snyk.io/vuln/SNYK-PYTHON-FLASKSECURITY-1293234 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P/RL:U/RC:C |
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | flask-security | <=3.0.0 <5.5.1 |
5.5.1 |
Affected products
- n/a Flask-Security
Classification
- Weakness
-
- CWE-601 URL Redirection to Untrusted Site
References
-
security.snyk.io
/vuln/SNYK-PYTHON-FLASKSECURITY-1293234
web, exploit, third-party-advisory
-
github.com
/mattupstate/flask-security
package, product, third-party-advisory
-
snyk.io
/blog/url-confusion-vulnerabilities/
technical-description, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2023/08/msg00034.html
mailing-list
-
nvd.nist.gov
/vuln/detail/CVE-2021-23385
advisory
-
snyk.io
/blog/url-confusion-vulnerabilities
web
-
pypi.org
/project/flask-security
package
-
github.com
/advisories/GHSA-cg8c-gc2j-2wf7
advisory
Sources
- CVE List CVE-2021-23385
- GitHub Advisory GHSA-cg8c-gc2j-2wf7
- NVD CVE-2021-23385
- OSV PYSEC-2026-809
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.