CVE-2021-23393 Open Redirect
Attackers can bypass URL validation to redirect users to arbitrary sites when using non-default WSGI configurations in Flask-Unchained.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-23393?
CVE-2021-23393 is a medium-severity vulnerability in Flask-Unchained, published on 10 Jun 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
This affects the package Flask-Unchained before 0.9.0. When using the the _validate_redirect_url function, it is possible to bypass URL validation and redirect a user to an arbitrary URL by providing multiple back slashes such as \\\evil.com/path. This vulnerability is only exploitable if an alternative WSGI server other than Werkzeug is used, or the default behaviour of Werkzeug is modified using 'autocorrect_location_header=False.
Weakness: CWE-601
Which versions are affected by CVE-2021-23393?
3 open source packages ship an affected version, including flask-unchained and Flask-Unchained. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
flask-unchained PyPI | All versions | 0.9.0 |
flask-unchained PyPI | All versions | 0.9.0 |
Flask-Unchained PyPI | All versions | 0.9.0 |
Products include Flask Unchained Project Flask Unchained.
How do I fix CVE-2021-23393?
Upgrade flask-unchained to 0.9.0 or later.
Is CVE-2021-23393 being exploited?
There is no known exploitation of CVE-2021-23393 in the wild and no public exploit code.
Sources
Also known as GHSA-pjc4-3w99-j7v4, PYSEC-2021-96, SNYK-PYTHON-FLASKUNCHAINED-1293189.