S4E just found a low-severity finding from [ai] web application external link detection scanner
PlatformPlansPartners
Resources
ToolsBlogDocs
Sign Up →
medium·Product Based Web Vulnerabilities·Updated Jan 3, 2024

CVE-2021-32618 Scanner

CVE-2021-32618 scanner - Open Redirect vulnerability in flask-security

Est. Time~10 seconds
Scan TypeSingle Scan
Targetsurl
CostFree
2.2k
Times Used
continuous scan runs
4.4k
Continuously Checked
assets under CS
0
Vulnerabilities Found
confirmed findings
References
CVECVE-2021-32618
6.1
CVSSlow
Exploitable remotely over the internet · no authentication required · user interaction needed.

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`.

Attack Vector
Network
Privileges Req.
None
User Interaction
Required
Affected
flask-securityby Flask-Middleware
<= 4.0.1
Updated Aug 21, 2026View on NVD →
Detail

Flask-Security-Too is a Python package that is widely used to add security features to Flask applications. It is an independent version of Flask-Security, with the core features being based on the 3.0.0 version of Flask-Security. This package allows redirects after numerous successful views, such as login, by honoring the ?next query parameter. The package uses Pythons urlsplit library to validate that the URL specified in the next parameter is either relative or has the same netloc as the requesting URL.

CVE-2021-32618 is a vulnerability detected in Flask-Security-Too, where an attacker can exploit the product by sending a link with a malicious URL. The validation function provided by the package can be bypassed by simply including a payload in the URL query parameter field. An attacker can add a URL with the same netloc or a relative URL, allowing the browser to redirect the user to a different website. Even though this vulnerability is considered low in severity, an attacker can easily exploit unsuspecting users by using legitimate sites, making the attack more credible.

If exploited, this vulnerability can result in attackers redirecting unsuspecting users to malicious websites, causing them to inadvertently download malware, leading to further exploitation. This can also lead to phishing attacks, where sensitive information such as credit card details, login credentials, and other personal data can be stolen. Therefore, companies and website owners need to be vigilant to ensure that such vulnerabilities are detected and resolved before they can cause harm.

Finally, it is worth highlighting that the pro features of the s4e.io platform provide an easy and straightforward way to learn about vulnerabilities in your digital assets. With these features, it has never been easier to understand the weaknesses in your security and protect your digital assets. Through this platform, you can ensure that your software is configured to meet the highest possible standards and adhere to all security protocols, providing you with peace of mind that your sensitive information is protected.

 

REFERENCES

Solution Advice

There are some precautions that can be taken to protect against this vulnerability. These include:

  • Always ensure you have the latest version of Flask-Security-Too installed.
  • Ensure that your application conforms to all Flask and Python security standards.
  • Provide appropriate training to all users, including an understanding of phishing and other social engineering attacks.
  • Implement secure coding practices and professional security monitoring services.
  • Update WSGI, as it is the last line of defence in web security.

Get AI-powered remediation steps tailored to your asset.

Try AI Solutions →

Check your infrastructure.
Right now.

11,000+ scanners. Free to start. No credit card required.