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

CVE-2020-5236 · Severity: low · CVSS 3.1 · Published 2020-02-04

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.

Technologies: waitress (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2020-5236 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2020-5236 being exploited in the wild.
How severe is CVE-2020-5236?
Low severity, with a CVSS score of 3.1, published 4 February 2020.
Which products and versions are affected?
waitress (PyPI) ECOSYSTEM:introduced=1.4.2,fixed=1.4.3, GIT:introduced=0,fixed=6e46f9e3f014d64dd7d1e258eaf626e39870ee1f|ECOSYSTEM:introduced=0,fixed=1.4.3.
Is there a fix for CVE-2020-5236?
Yes. waitress (PyPI): upgrade to 1.4.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2020-5236?
Check whether you run waitress (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • waitress (PyPI): upgrade to 1.4.3 or later
    pip install "waitress>=1.4.3"

Affected products

  • waitress (PyPI) ECOSYSTEM:introduced=1.4.2,fixed=1.4.3, GIT:introduced=0,fixed=6e46f9e3f014d64dd7d1e258eaf626e39870ee1f|ECOSYSTEM:introduced=0,fixed=1.4.3

Identifiers

  • CVE-2020-5236
  • GHSA-73m2-3pwg-5fgc
  • PYSEC-2020-155

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.