5.8
CVSSv2

CVE-2021-32618

Published: 17/05/2021 Updated: 26/05/2021
CVSS v2 Base Score: 5.8 | Impact Score: 4.9 | Exploitability Score: 8.6
CVSS v3 Base Score: 6.1 | Impact Score: 2.7 | Exploitability Score: 2.8
VMScore: 516
Vector: AV:N/AC:M/Au:N/C:P/I:P/A:N

Vulnerability 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 login?next=\\\github.com will pass FS's relative URL check however many browsers will gladly convert this to 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`.

Vulnerability Trend

Vulnerable Product Search on Vulmon Subscribe to Product

flask-security project flask-security

Vendor Advisories

All versions of Flask-Security-Too allow redirects after many successful views (eg /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 Python's urlsplit library However many ...

Github Repositories

CVE-2023-49438 - Open Redirect Vulnerability in Flask-Security-Too

CVE-2023-49438 Proof of Concept Description An open redirect vulnerability in the python package Flask-