CVEfocus › CVE database › CVE-2021-32618

CVE-2021-32618Open Redirect Vulnerability

CVSS 3.1 LowEPSS 2.8% (higher than 87% of CVEs)Published 2021-05-17Updated 2024-08-03Assigner: GitHub_M

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

CWE-601

What to do

Fixed builds are available from PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
1Fix pending
3Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04flask-securityWill not fix
This CVE is a duplicate of CVE-2021-23385, but for flask-security-too (new upstream). In Ubuntu, the flask-security source package started to be based on…
UBUNTU-CVE-2021-32618
Ubuntu 22.04flask-securityWill not fix
This CVE is a duplicate of CVE-2021-23385, but for flask-security-too (new upstream). In Ubuntu, the flask-security source package started to be based on…
UBUNTU-CVE-2021-32618
Ubuntu 20.04flask-securityWill not fix
This CVE is a duplicate of CVE-2021-23385, but for flask-security-too (new upstream). In Ubuntu, the flask-security source package started to be based on…
UBUNTU-CVE-2021-32618
Ubuntu 18.04flask-securityFix pendingUBUNTU-CVE-2021-32618
PyPI libraryflask-security-tooFixed4.1.0PYSEC-2021-123

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.