UBUNTU-CVE-2021-32618

Source
https://ubuntu.com/security/CVE-2021-32618
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-32618.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2021-32618
Upstream
  • CVE-2021-32618
Published
2021-05-17T18:15:00Z
Modified
2025-10-24T04:50:20Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
  • 3.1 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N CVSS Calculator
  • Ubuntu - low
Summary
[none]
Details

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 'autocorrectlocationheader=False`.

References

Affected packages

Ubuntu:Pro:18.04:LTS / flask-security

Package

Name
flask-security
Purl
pkg:deb/ubuntu/flask-security@1.7.5-2ubuntu0.18.04.1~esm1?arch=source&distro=esm-apps/bionic

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.7.5-1
1.7.5-2
1.7.5-2ubuntu0.18.04.1~esm1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "1.7.5-2ubuntu0.18.04.1~esm1",
            "binary_name": "python3-flask-security"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-32618.json"

Ubuntu:20.04:LTS / flask-security

Package

Name
flask-security
Purl
pkg:deb/ubuntu/flask-security@1.7.5-2ubuntu0.20.04.1?arch=source&distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

1.*
1.7.5-2
1.7.5-2ubuntu0.20.04.1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "1.7.5-2ubuntu0.20.04.1",
            "binary_name": "python3-flask-security"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-32618.json"

Ubuntu:22.04:LTS / flask-security

Package

Name
flask-security
Purl
pkg:deb/ubuntu/flask-security@4.0.0-1ubuntu0.1?arch=source&distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

4.*
4.0.0-1
4.0.0-1ubuntu0.1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "4.0.0-1ubuntu0.1",
            "binary_name": "python3-flask-security"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-32618.json"

Ubuntu:24.04:LTS / flask-security

Package

Name
flask-security
Purl
pkg:deb/ubuntu/flask-security@5.4.1-1?arch=source&distro=noble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

5.*
5.1.2-1
5.4.1-1

Ecosystem specific

{
    "binaries": [
        {
            "binary_version": "5.4.1-1",
            "binary_name": "python3-flask-security"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-32618.json"