Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Flask-Security
  4. ›
  5. GHSA-w2j7-f3c6-g8cw

GHSA-w2j7-f3c6-g8cw: Flask-Security has an Open Redirect issue

June 23, 2026

flask_security.utils.validate_redirect_url() can allow an attacker-controlled redirect URL when subdomain redirects are enabled.

The bypass uses a backslash inside the URL authority/host:

http://evil.com\.whitelist.com
http://evil.com%5C.whitelist.com

Python’s urlsplit() parses the full authority as evil.com\.whitelist.com or evil.com%5C.whitelist.com. Because the value ends with .whitelist.com, validate_redirect_url() accepts it as an allowed subdomain of whitelist.com.

This is similar in class to the previous Flask-Security-Too open redirect advisory CVE-2023-49438 / GHSA-672h-6x89-76m5, where crafted redirect URLs bypassed validation through browser URL normalization behavior.

References

  • advisories.gitlab.com/pypi/flask-security-too/CVE-2023-49438
  • github.com/advisories/GHSA-w2j7-f3c6-g8cw
  • github.com/pallets-eco/flask-security/security/advisories/GHSA-w2j7-f3c6-g8cw
  • nvd.nist.gov/vuln/detail/CVE-2023-49438
  • osv.dev/vulnerability/CVE-2023-49438

Code Behaviors & Features

Detect and mitigate GHSA-w2j7-f3c6-g8cw with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.8.1

Fixed versions

  • 5.8.1

Solution

Upgrade to version 5.8.1 or above.

Impact 4.7 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

pypi/Flask-Security/GHSA-w2j7-f3c6-g8cw.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 26 Jun 2026 00:17:44 +0000.