{"cve":"CVE-2021-32618","nvd":{"published":"2021-05-17T18:15:08.123","modified":"2026-06-17T03:53:16.967","status":"Modified","description":"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`.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-601"],"references":["https://github.com/Flask-Middleware/flask-security/issues/486","https://github.com/Flask-Middleware/flask-security/security/advisories/GHSA-6qmf-fj6m-686c","https://github.com/Flask-Middleware/flask-security/issues/486","https://github.com/Flask-Middleware/flask-security/security/advisories/GHSA-6qmf-fj6m-686c"],"products":["flask-security_project:flask-security"],"source":"nvd","synced_at":"2026-10-19T21:18:09.669877188+00:00"},"epss":{"cve":"CVE-2021-32618","score":0.02838,"percentile":0.86654,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-6qmf-fj6m-686c","url":"https://osv.dev/vulnerability/GHSA-6qmf-fj6m-686c","summary":"Open Redirect in Flask-Security-Too","modified":"2024-09-20T21:25:44.564354Z","packages":[{"ecosystem":"PyPI","name":"flask-security-too","purl":"pkg:pypi/flask-security-too","ranges":["<4.1.0"],"fixed":["4.1.0"]}]},{"id":"PYSEC-2021-123","url":"https://osv.dev/vulnerability/PYSEC-2021-123","summary":"","modified":"2023-11-08T04:05:54.497333Z","packages":[{"ecosystem":"PyPI","name":"flask-security-too","purl":"pkg:pypi/flask-security-too","ranges":["<4.1.0"],"fixed":["4.1.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}