Skip to content
Heist/ feed
Back to feed
Medium

Uncaught Exception (due to a data race) leads to process termination in Waitress

Type: advisorySources: OSV

Waitress is a Web Server Gateway Interface server for Python 2 and 3. Waitress versions 2.1.0 and 2.1.1 may terminate early due to a thread closing a socket while the main thread is about to call select(). This will lead to the main thread raising an exception that is not handled and then causing the entire application to be killed. This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket. Instead, that is always delegated to the main thread. There is no work-around for this issue. However, users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-31015
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 17:12 UTC · Revision 1

Source evidence

Uncaught Exception (due to a data race) leads to process termination in Waitress

core-osv · Original source

Published 31 May 2022, 22:50 UTC

Waitress is a Web Server Gateway Interface server for Python 2 and 3. Waitress versions 2.1.0 and 2.1.1 may terminate early due to a thread closing a socket while the main thread is about to call select(). This will lead to the main thread raising an exception that is not handled and then causing the entire application to be killed. This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket. Instead, that is always delegated to the main thread. There is no work-around for this issue. However, users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.

osv:CVE-2022-31015
Complete source record
{
  "id": "dfb650bfab6335ebd8c6abc82b5f7da7ae8c15ace3a63ce3b83265f8b0d00d43",
  "url": "https://osv.dev/vulnerability/CVE-2022-31015",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Uncaught Exception (due to a data race) leads to process termination in Waitress",
    "summary": "Waitress is a Web Server Gateway Interface server for Python 2 and 3. Waitress versions 2.1.0 and 2.1.1 may terminate early due to a thread closing a socket while the main thread is about to call select(). This will lead to the main thread raising an exception that is not handled and then causing the entire application to be killed. This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket. Instead, that is always delegated to the main thread. There is no work-around for this issue. However, users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.",
    "evidence": "osv:CVE-2022-31015",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2022-31015",
      "aliases": [
        "CVE-2022-31015",
        "GHSA-f5x9-8jwc-25rw",
        "PYSEC-2022-205"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pylons/waitress",
              "type": "GIT",
              "events": [
                {
                  "introduced": "c87c899dc6b9c56ff8f1fc6a674a25b1109bad85"
                },
                {
                  "fixed": "0aa4879d08b1fa816505dbb4f42342ba1d531644"
                },
                {
                  "fixed": "4f6789b035610e0552738cdc4b35ca809a592d48"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:agendaless:waitress:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.1.0"
                      },
                      {
                        "fixed": "2.1.2"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4f6789b035610e0552738cdc4b35ca809a592d48"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.1.1",
            "v2.1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31015.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:21.706269361Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31015.json",
        "https://github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-31015",
        "https://github.com/Pylons/waitress/issues/374",
        "https://github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48",
        "https://github.com/Pylons/waitress/pull/377"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-248",
          "CWE-362"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31015.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-31015",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 487590,
  "published_at": "2022-05-31T22:50:12+00:00"
}