Open Redirect Vulnerability in Python Werkzeug: CVE-2020-28724

python-werkzeug Updated 02 Oct 2025

Summary

18/11/2020
N/A
Yes i
Medium
6.1

CVE-2020-28724: Open redirect vulnerability in werkzeug before 0.11.6 via a double slash in the URL. Affects python-werkzeug across 2 version ranges.

< 0.11.9+dfsg1-1 < e6d0e510738952788fdd01bbfe5dfb2d8cff0ba4

Fixed in 0.11.9+dfsg1-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python Werkzeug is a comprehensive WSGI (Web Server Gateway Interface) utility library for Python that aids in building web applications. It provides essential tools for request and response handling, debugging, and more. The library is widely used in various Python web frameworks, making it crucial for developers to ensure its security. The vulnerability CVE-2020-28724 arises from an open redirect flaw that can be exploited through a specific URL structure, potentially leading to security breaches.

Vulnerability Detail

The vulnerability CVE-2020-28724 is an open redirect issue found in Werkzeug versions prior to 0.11.6. It allows attackers to manipulate URLs with a double slash, which can redirect users to malicious sites without their consent. This flaw can be exploited to perform phishing attacks or to redirect users to harmful content, compromising the integrity of web applications that rely on Werkzeug for handling requests. The technical aspect of this vulnerability lies in the improper validation of URL paths, which fails to adequately handle double slashes.

How To Fix

Minimum fixed version

0.11.9+dfsg1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing URL validation in your application to prevent double slashes in URLs. This can be done by adding a check in your routing logic to reject or sanitize URLs containing double slashes.

Conclusion

The CVE-2020-28724 vulnerability in Python Werkzeug poses a significant risk due to its potential for open redirects. It is crucial for developers to upgrade to the fixed version to safeguard their applications. Implementing URL validation can serve as a temporary measure until an upgrade is possible.

See every vulnerability recorded for python-werkzeug →

Share this vulnerability

FAQ

CVE-2020-28724 is an open redirect vulnerability in the Werkzeug library that allows attackers to redirect users to malicious sites via manipulated URLs.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which analyzes your manifest file for vulnerabilities.

Exploitation of this vulnerability can lead to phishing attacks, user redirection to harmful sites, and a loss of trust in your application.

You can upgrade Werkzeug using pip with the command 'pip install --upgrade Werkzeug' or through your package manager for Debian systems.

Yes, you can implement URL validation in your application to reject or sanitize URLs containing double slashes as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python-werkzeug.

How To Fix

Minimum fixed version

0.11.9+dfsg1-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback