CVE-2024-49769: Waitress Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-3f84-rpwh-47g6
CVSS 7.5
CWE-772
Published
Advisory Summary

CVE-2024-49769 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-772: Missing Release of Resource after Effective Lifetime) affecting Waitress libraries in the PyPI ecosystem. The issue involves waitress vulnerable to dos leading to high cpu usage/resource exhaustion. Remediation is available by upgrading affected packages to version 3.0.1.

CVE-2024-49769 at a Glance

CVE Identifier CVE-2024-49769
GHSA Identifier GHSA-3f84-rpwh-47g6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-772: Missing Release of Resource after Effective Lifetime
Affected Product Waitress
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-49769

To remediate this vulnerability, upgrade all affected Waitress dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

waitress fixed: 3.0.1
pip install waitress>=3.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show waitress

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-49769, inspect your installed packages using pip:

pip show waitress

Analyze the terminal output to locate any version of Waitress in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.1), your application is affected.

Note: The pip show waitress command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-772: Missing Release of Resource after Effective Lifetime, where the product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed. In Waitress, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2024-49769 Affected Waitress Versions

1 component(s)
Fixed Versions:
3.0.1
Product / Package Ecosystem Affected Versions Fixed Version
waitress
PyPI
< 3.0.1
3.0.1

References

Frequently Asked Questions

What is CVE-2024-49769?
CVE-2024-49769 is a security vulnerability in Waitress involving Waitress vulnerable to DoS leading to high CPU usage/resource exhaustion under CWE-772: Missing Release of Resource after Effective Lifetime.
Which Waitress versions are affected?
Affected versions include releases prior to 3.0.1 across affected packages: waitress.
What version fixes CVE-2024-49769?
Upgrading to 3.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is waitress affected?
Yes, waitress is affected in releases prior to 3.0.1. Upgrade your dependency to 3.0.1 or later.
What is the CVSS score of CVE-2024-49769?
CVE-2024-49769 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-49769?
CVE-2024-49769 is classified under CWE-772: Missing Release of Resource after Effective Lifetime (The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.).
How can I check PyPI dependencies for CVE-2024-49769?
Run the dependency tree command: 'pip show waitress'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3f84-rpwh-47g6",
  "modified" : "2025-01-21T17:53:27Z",
  "published" : "2024-10-29T14:33:00Z",
  "aliases" : [ "CVE-2024-49769" ],
  "summary" : "Waitress vulnerable to DoS leading to high CPU usage/resource exhaustion",
  "details" : "### Impact\n\nWhen 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.\n\nA remote attacker could run waitress out of available sockets with very little resources required.\n\n### Patches\n\nWaitress 3.0.1 contains fixes that remove the race condition.\n\n### Workarounds\n\nNo work-around.\n\n### References\n\n- https://github.com/Pylons/waitress/issues/418\n- https://github.com/Pylons/waitress/pull/435\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "waitress"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Pylons/waitress/security/advisories/GHSA-3f84-rpwh-47g6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-49769"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Pylons/waitress/issues/418"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Pylons/waitress/pull/435"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Pylons/waitress/commit/1ae4e894c9f76543bee06584001583fc6fa8c95c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Pylons/waitress"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/waitress/PYSEC-2024-211.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/11/msg00012.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-772" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-29T14:33:00Z",
    "nvd_published_at" : "2024-10-29T15:15:12Z"
  }
}