Cloudanix VulnDB

CVE-2024-49769

None

CVSS

—

EPSS

1.4%

Published

Oct 29, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a Python web server lets attackers make the server stop responding by quickly opening and closing many connections, using almost no resources on their side.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Network Service
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Race condition in connection cleanup allows a client-closed socket to remain in the processing list, causing the main thread to repeatedly call write on a non-existent socket and enter a busy loop that exhausts available sockets.

Why it matters to the business

Service becomes unavailable to legitimate users after an attacker expends minimal resources, leading to downtime for any applications relying on the affected server.

How an attack unfolds

An attacker repeatedly opens TCP connections to the Waitress server and immediately closes them before getpeername is invoked, triggering the race condition that leaves sockets in the event loop and forces continuous write attempts until socket resources are depleted.

How to fix it

Upgrade pylons/waitress to version 3.0.1 or later, which includes commit ae949bb428e50cf04152db56460f31c1e6d3a2a9 that removes the race condition. If immediate upgrade is not possible, apply the patch from the referenced commit or implement connection-handling mitigations such as rate limiting at a reverse proxy.

How to confirm the fix worked

Verify the installed version is 3.0.1 or newer; run a test that opens and immediately closes connections while monitoring CPU and socket usage to confirm the busy loop no longer occurs.

Typical attack path

  1. Establish a TCP connection to the Waitress listening socket
  2. Close the connection before the server calls getpeername
  3. Repeat the open-close sequence at high frequency to trigger busy-loop behavior
  4. Continue until the server runs out of file descriptors and stops accepting new connections

How to detect it

Examine server logs and process metrics for repeated socket-write errors or sustained high CPU usage on the main thread coinciding with connection churn; correlate with network flow data showing many short-lived connections from the same sources.

What your security team should do

  • Upgrade to the fixed version without delay
  • Place Waitress behind a reverse proxy that can enforce connection rate limits
  • Monitor server resource usage for sudden spikes in CPU or open file descriptors
  • Review application deployment manifests to ensure no pinned vulnerable versions remain

The record

Waitress is a Web Server Gateway Interface server for Python 2 and 3. 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. Waitress 3.0.1 contains fixes that remove the race condition.

Affected packages

Ecosystem Package Introduced Fixed
PyPI waitress 0 1ae4e894c9f76543bee06584001583fc6fa8c95c
PyPI waitress 0 3.0.1
Debian:11 waitress 0 No fix
Debian:11 waitress 0 1.4.4-1.1+deb11u2
Debian:12 waitress 0 No fix
Debian:13 waitress 0 No fix
Debian:14 waitress 0 3.0.1-1
Mageia:9 python-waitress 0 2.1.2-1.1.mga9
Red Hat:openshift_ironic:4.12::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.12::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.13::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.13::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.14::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.14::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.15::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.15::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.16::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.16::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.17::el9 python-waitress 0 0:3.0.1-1.el9
Red Hat:openshift_ironic:4.17::el9 python3-waitress 0 0:3.0.1-1.el9
Red Hat:openstack:16.2::el8 python-waitress 0 0:2.0.0-4.el8ost
Red Hat:openstack:16.2::el8 python3-waitress 0 0:2.0.0-4.el8ost
SUSE:Enterprise Storage 7.1 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python-waitress 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS python-waitress-doc 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python-waitress 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS python-waitress-doc 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Module for Basesystem 15 SP6 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Module for Package Hub 15 SP5 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Module for Package Hub 15 SP6 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Module for Python 3 15 SP5 python-waitress 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Module for Python 3 15 SP5 python-waitress-doc 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python-waitress 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Module for Python 3 15 SP6 python-waitress-doc 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Server 15 SP2-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Server 15 SP3-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python-waitress 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Server 15 SP4-LTSS python-waitress-doc 0 2.1.2-150400.12.7.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP3 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP4 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Manager Proxy 4.3 python-waitress 0 1.4.3-150000.3.9.1
SUSE:Manager Server 4.3 python-waitress 0 1.4.3-150000.3.9.1
Ubuntu:16.04:LTS waitress 0 No fix
Ubuntu:18.04:LTS waitress 0 No fix
Ubuntu:20.04:LTS waitress 0 1.4.1-1ubuntu0.2
Ubuntu:22.04:LTS waitress 0 1.4.4-1.1ubuntu1.1
Ubuntu:24.04:LTS waitress 0 No fix
Ubuntu:24.10 waitress 0 3.0.0-1ubuntu0.1
Ubuntu:Pro:16.04:LTS waitress 0 No fix
Ubuntu:Pro:18.04:LTS waitress 0 No fix
Ubuntu:Pro:24.04:LTS waitress 0 2.1.2-2ubuntu0.1~esm1
openSUSE:Leap 15.5 python-waitress 0 2.1.2-150400.12.7.1
openSUSE:Leap 15.5 python-waitress 0 1.4.3-150000.3.9.1
openSUSE:Leap 15.5 python-waitress-doc 0 2.1.2-150400.12.7.1
openSUSE:Tumbleweed python-waitress 0 3.0.1-1.1

Related vulnerabilities