Vulnerability · Published May 31, 2022 · Assigned by GitHub_M
CVE-2022-31015Uncaught Exception (due to a data race) leads to process termination in Waitress
Medium 6.5
In plain English
A medium-severity race condition in waitress from Pylons. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 74% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | py3-waitress | 2.1.2-r0 | ALPINE-CVE-2022-31015 |
| Alpine:v3.21 | py3-waitress | 2.1.2-r0 | ALPINE-CVE-2022-31015 |
| Alpine:v3.22 | py3-waitress | 2.1.2-r0 | ALPINE-CVE-2022-31015 |
| Alpine:v3.23 | py3-waitress | 2.1.2-r0 | ALPINE-CVE-2022-31015 |
| Alpine:v3.24 | py3-waitress | 2.1.2-r0 | ALPINE-CVE-2022-31015 |
| Debian:12 | waitress | 2.1.2-1 | DEBIAN-CVE-2022-31015 |
| Debian:13 | waitress | 2.1.2-1 | DEBIAN-CVE-2022-31015 |
| Debian:14 | waitress | 2.1.2-1 | DEBIAN-CVE-2022-31015 |
| PyPI | waitress | 2.1.2 | PYSEC-2022-205 |
| PyPI | waitress | 2.1.2 | GHSA-f5x9-8jwc-25rw |
Affected products (as reported)
Weakness: CWE-248, CWE-362 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
References
- https://github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw x_refsource_CONFIRM
- https://github.com/Pylons/waitress/issues/374 x_refsource_MISC
- https://github.com/Pylons/waitress/pull/377 x_refsource_MISC
- https://github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48 x_refsource_MISC