Flask-Security

CVE-2021-23385

CVE-2021-23385 is a medium-severity open redirect vulnerability in Flask-Security (pip), affecting versions <= 3.0.0. No fixed version is listed yet.

Key facts
CVSS score
6.1
Medium
Attack vector
Network
Issuing authority
GitHub Advisory Database
Affected package
Flask-Security
Fixed in
Not available
Disclosed
2021

Summary

This affects all versions of package Flask-Security. When using the getpostlogoutredirect and getpostloginredirect 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 'autocorrectlocationheader=False. Note: Flask-Security is not maintained anymore.

Impact

What is open redirect?

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

Severity and exposure

CVE-2021-23385 has a CVSS score of 6.1 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.

No fixed version is listed yet, so configuration controls and monitoring matter more in the interim.

Affected versions

pip

  • Flask-Security (<= 3.0.0)

Security releases

Not available
Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.

Kodem's runtime-powered SCA identifies whether CVE-2021-23385 is reachable in your applications. Explore open-source security for your team.

See if CVE-2021-23385 is reachable in your applications. Get a demo

Already deployed Kodem? See CVE-2021-23385 in your environment

Remediation advice

No fixed version is listed for CVE-2021-23385 yet.

In the interim: Validate redirect destinations against an allowlist of permitted URLs or paths. Reject destinations that include an unexpected authority component.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently asked questions about CVE-2021-23385

What is CVE-2021-23385?

CVE-2021-23385 is a medium-severity open redirect vulnerability in Flask-Security (pip), affecting versions <= 3.0.0. No fixed version is listed yet. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.

How severe is CVE-2021-23385?

CVE-2021-23385 has a CVSS score of 6.1 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.

Which versions of Flask-Security are affected by CVE-2021-23385?

Flask-Security (pip) versions <= 3.0.0 is affected.

Is there a fix for CVE-2021-23385?

No fixed version is listed for CVE-2021-23385 yet. Monitor the advisory for updates and apply mitigations in the interim.

Is CVE-2021-23385 exploitable, and should I be worried?

Whether CVE-2021-23385 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo

What actually determines whether CVE-2021-23385 is exploitable, and how bad it is?

Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.

How do I fix CVE-2021-23385?

No fixed version is listed yet. In the interim: Validate redirect destinations against an allowlist of permitted URLs or paths. Reject destinations that include an unexpected authority component.

Stop the waste.
Protect your environment with Kodem.