HighGHSA-3f84-rpwh-47g6CVE-2024-49769PYSEC-2024-211

Waitress vulnerable to DoS leading to high CPU usage/resource exhaustion

Published 29 Oct 2024 · Updated 21 Jan 2025

Is your project on an affected waitress?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<3.0.1
Fixed in
3.0.1
Update to the fixed version for your release line, for example:pip install 'waitress>=3.0.1'

Details

Impact

When a remote client closes the connection before waitress has had the opportunity to call getpeername() waitress won't correctly clean up the connection leading to the main thread attempting to write to a socket that no longer exists, but not removing it from the list of sockets to attempt to process. This leads to a busy-loop calling the write function.

A remote attacker could run waitress out of available sockets with very little resources required.

Patches

Waitress 3.0.1 contains fixes that remove the race condition.

Workarounds

No work-around.

References

  • https://github.com/Pylons/waitress/issues/418
  • https://github.com/Pylons/waitress/pull/435

Is GHSA-3f84-rpwh-47g6 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected waitress, and gives you the command that fixes it.

More advisories for waitress

  • CriticalCVE-2024-49768Waitress has request processing race condition in HTTP pipelining with invalid first request · 29 Oct 2024
  • HighCVE-2022-31015Uncaught Exception (due to a data race) leads to process termination in Waitress · 2 Jun 2022
  • HighCVE-2022-24761HTTP Request Smuggling in waitress · 18 Mar 2022
  • MediumCVE-2020-5236Catastrophic backtracking in regex allows Denial of Service in Waitress · 4 Feb 2020
  • MediumCVE-2019-16789HTTP Request Smuggling in Waitress: Invalid whitespace characters in headers (Follow-up) · 6 Jan 2020
  • HighGHSA-m5ff-3wj3-8ph4HTTP Request Smuggling: Invalid whitespace characters in headers in Waitress · 26 Dec 2019
All 10 advisories for waitress

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.