CVE-2023-49438
JSON

6.1medium

Open redirect vulnerability in Flask-Security-Too

Severity
6.1medium CVSS:3.1 by NVD
Exploit likelihood
1.07% (higher than 65% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-672h-6x89-76m5PYSEC-2023-248

Description

An open redirect vulnerability in the python package Flask-Security-Too <=5.3.2 allows attackers to redirect unsuspecting users to malicious sites via a crafted URL by abusing the ?next parameter on the /login and /register routes.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
flask-security-too (PyPI)before 5.3.3GitHub Advisory Database, PyPA Advisory Database
flask-security-too_project flask-security-tooup to 5.3.2NVD

All scores

GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
PyPA Advisory Database6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

What each source says

CVE List

An open redirect vulnerability in the python package Flask-Security-Too <=5.3.2 allows attackers to redirect unsuspecting users to malicious sites via a crafted URL by abusing the ?next parameter on the /login and /register routes.

GitHub Advisory Database

An open redirect vulnerability in the python package Flask-Security-Too <=5.3.2 allows attackers to redirect unsuspecting users to malicious sites via a crafted URL by abusing the ?next parameter on the /login and /register routes.

Flask-Security-Too contains logic to validate that the URL specified within the next parameter is either relative or has the same network location as the requesting URL in an attempt to prevent open redirections. Previously known examples that bypassed the validation logic such as https://example/login?next=\\\\\\github.com were patched in version 4.1.0

However, examples such as https://example/login?next=/\\github.com and https://example/login?next=\\/github.com were discovered due to how web browsers normalize slashes in URLs, which makes the package vulnerable through version <=5.3.2

Additionally, with Werkzeug >=2.1.0 the autocorrect_location_header configuration was changed to False - which means that location headers in redirects are relative by default. Thus, this issue may impact applications that were previously not impacted, if they are using Werkzeug >=2.1.0 as the WSGI layer.

NVD (es)

Una vulnerabilidad de redireccionamiento abierto en el paquete Python Flask-Security-Too &lt;=5.3.2 permite a los atacantes redirigir a usuarios desprevenidos a sitios maliciosos a través de una URL manipulada abusando del parámetro ?next en las rutas /login y /register.

References

https://github.com/Flask-Middleware/flask-securitypackage, product, web
https://github.com/brandon-t-elliott/CVE-2023-49438evidence, exploit, mitigation, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6HCYH377TPUMUHELPI36PDS2ZM4VFIXM/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/6HCYH377TPUMUHELPI36PDS2ZM4VFIXM/
https://nvd.nist.gov/vuln/detail/CVE-2023-49438advisory
https://github.com/Flask-Middleware/flask-security/commit/8b5abc4d4db9926a3d76b34b8b03255effb5e712web
https://github.com/pypa/advisory-database/tree/main/vulns/flask-security-too/PYSEC-2023-248.yamlweb
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6HCYH377TPUMUHELPI36PDS2ZM4VFIXMweb
https://github.com/advisories/GHSA-672h-6x89-76m5advisory

Sources

SourceRecordLicence
CVE ListCVE-2023-49438 changed 2025-11-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-672h-6x89-76m5 changed 2024-09-20CC-BY-4.0
NVDCVE-2023-49438 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2023-248 changed 2026-06-10CC-BY-4.0