Read the docs
TI-2021-12287 Aliases CVE-2021-32618GHSA-6qmf-fj6m-686c

Open redirect in Flask-Middleware flask-security

Priority LOW 32CWE-601Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Spoofing
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-601.

Summary

The Python "Flask-Security-Too" package is used for adding security features to your Flask application. It is an is an independently maintained version of Flask-Security based on the 3.0.0 version of Flask-Security. All versions of Flask-Security-Too allow redirects after many successful views (e.g. /login) by honoring the ?next query param. There is code in FS to validate that the url specified in the next parameter is either relative OR has the same netloc (network location) as the requesting URL. This check utilizes Pythons urlsplit library. However many browsers are very lenient on the kind of URL they accept and 'fill in the blanks' when presented with a possibly incomplete URL. As a concrete example - setting http://login?next=\\\github.com will pass FS's relative URL check however many browsers will gladly convert this to http://github.com. Thus an attacker could send such a link to an unwitting user, using a legitimate site and have it redirect to whatever site they want. This is considered a low severity due to the fact that if Werkzeug is used (which is very common with Flask applications) as the WSGI layer, it by default ALWAYS ensures that the Location header is absolute - thus making this attack vector mute. It is possible for application writers to modify this default behavior by setting the 'autocorrect_location_header=False`.

Why it matters now

EPSS 0.02838 86th percentileScored 2026-11-07
Fix Fixed Flask-Security-Too (PyPI): 4.1.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
Flask-Middlewareflask-securityup to 4.0.1—No fix listedCNA
—Flask-Security-Too (PyPI)before 4.1.04.1.0Patch availableGHSA-6qmf-fj6m-686c
  • flask-security VendorFlask-Middleware Affected up to 4.0.1 Fixed in — No fix listed CNA
  • Flask-Security-Too (PyPI) Vendor— Affected before 4.1.0 Fixed in 4.1.0 Patch available GHSA-6qmf-fj6m-686c

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:flask-security_project:flask-security:*:*:*:*:*:*:*:*all versionsVulnerableFlask-security Project
  • cpe:2.3:a:flask-security_project:flask-security:*:*:*:*:*:*:*:* Versions all versions Vulnerable ·Flask-security Project

Remediation

  • Fix · GHSA-6qmf-fj6m-686c Flask-Security-Too (PyPI) Fixed in 4.1.0 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2021-32618
  2. 2026-10-03 Alias added: GHSA-6qmf-fj6m-686c

References

Sources