CVE-2020-5236: Catastrophic backtracking in regex allows Denial of Service in Waitress

waitress Updated 02 Oct 2025

Summary

04/02/2020
Yes i
Moderate
5.7

CVE-2020-5236: Catastrophic backtracking in regex allows Denial of Service in Waitress. Affects waitress versions >= 1.4.2, < 1.4.3. Fixed in 1.4.3. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Waitress is a Python web server that serves web applications. It is designed to be fast, efficient, and easy to use. The vulnerability in Waitress version 1.4.2 allows for a Denial of Service (DoS) attack when receiving a header with invalid characters. This causes the regular expression engine to catastrophically backtrack, consuming 100% CPU time and blocking other interactions. An attacker can exploit this vulnerability by sending a single request with an invalid header, effectively taking the service offline. The issue was introduced in version 1.4.2 when the regular expression was updated to match the behavior required by errata associated with RFC7230.

Vulnerability Detail

The vulnerability in Waitress version 1.4.2 allows for a DoS attack by exploiting a catastrophic backtracking issue in the regular expression used to validate incoming headers. When an invalid header with excessive characters is received, the regular expression engine enters a state of catastrophic backtracking, causing the process to consume 100% CPU time and blocking other interactions. This allows an attacker to send a single request with an invalid header and effectively take the service offline. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 5.7.

How To Fix

Latest published version: 3.0.2 as of 22 Oct 2026

pip install --upgrade "waitress==3.0.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.3

This is the first release that contains the fix.

pip install --upgrade "waitress==1.4.3"

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

Workaround

If you have deployed a reverse proxy in front of Waitress, it may already be rejecting requests that include invalid headers. This can serve as a workaround to mitigate the vulnerability. However, it is still recommended to upgrade to the latest version of Waitress to ensure complete protection.

Conclusion

The vulnerability in Waitress version 1.4.2 allows for a Denial of Service (DoS) attack by exploiting a catastrophic backtracking issue in the regular expression used to validate incoming headers. To mitigate this vulnerability, it is recommended to upgrade to version 1.4.3 of Waitress, which includes a patch for the issue. If you have deployed a reverse proxy in front of Waitress, it may already be rejecting requests with invalid headers, providing a partial workaround. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for waitress →

Share this vulnerability

FAQ

The vulnerability allows an attacker to send a single request with an invalid header, causing the Waitress server to consume 100% CPU time and block other interactions. This effectively takes the service offline, resulting in a Denial of Service (DoS) attack.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just the Pipfile.lock file.

The recommended solution is to upgrade to version 1.4.3 of Waitress. This version includes a patch for the vulnerability by updating the regular expression used to validate incoming headers.

If you have deployed a reverse proxy in front of Waitress, it may already be rejecting requests with invalid headers, serving as a workaround to mitigate the vulnerability. However, upgrading to the latest version of Waitress is still recommended for complete protection.

The vulnerability was discovered and disclosed by Fil Zembowicz, who reached out to the Pylons Project with the findings.

Related vulnerabilities

Recent vulnerabilities recorded for waitress.

How To Fix

Latest published version: 3.0.2 as of 22 Oct 2026

pip install --upgrade "waitress==3.0.2"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.4.3

This is the first release that contains the fix.

pip install --upgrade "waitress==1.4.3"

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