CVE-2022-31015
Uncaught Exception (due to a data race) leads to process termination in Waitress
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.5
Uncaught Exception (due to a data race) leads to process termination in Waitress
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.
- Record
CVE-2022-31015- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-248, CWE-362
- Updated
- 2026-11-02
EUVDEUVD-2022-0359
6.5
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.
- Record
EUVD-2022-0359- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-f5x9-8jwc-25rw
7.1
Uncaught Exception (due to a data race) leads to process termination in Waitress
Impact
Waitress 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.
Patches
This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket, instead it is always delegated to the main thread.
Workarounds
There is no work-around, however users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.
For more information
If you have any questions or comments about this advisory:
- Open an issue in https://github.com/Pylons/waitress/issues (if not sensitive or security related)
- email the Pylons Security mailing list: [email protected] (if security related)
- Record
GHSA-f5x9-8jwc-25rw- CVSS 4.0
- 7.1 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-248, CWE-362
- Updated
- 2026-11-02
NVD
6.5
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.
- Record
CVE-2022-31015- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:N/A:P - Weakness
- CWE-248, CWE-362
- Updated
- 2026-11-02
OSVALPINE-CVE-2022-31015
5.9
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.
- Record
ALPINE-CVE-2022-31015- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVAZL-43513
5.9
CVE-2022-31015 affecting package python-waitress 1.4.4-7
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.
- Record
AZL-43513- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 7 moreShow less
OSVAZL-44571
5.9
CVE-2022-31015 affecting package python-waitress for versions less than 3.0.1-1
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.
- Record
AZL-44571- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSV
6.5
Uncaught Exception (due to a data race) leads to process termination in Waitress
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.
- Record
CVE-2022-31015- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-248, CWE-362
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2022-31015
5.9
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.
- Record
DEBIAN-CVE-2022-31015- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSVGHSA-f5x9-8jwc-25rw
7.1
Uncaught Exception (due to a data race) leads to process termination in Waitress
Impact
Waitress 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.
Patches
This issue has been fixed in Waitress 2.1.2 by no longer allowing the WSGI thread to close the socket, instead it is always delegated to the main thread.
Workarounds
There is no work-around, however users using waitress behind a reverse proxy server are less likely to have issues if the reverse proxy always reads the full response.
For more information
If you have any questions or comments about this advisory:
- Open an issue in https://github.com/Pylons/waitress/issues (if not sensitive or security related)
- email the Pylons Security mailing list: [email protected] (if security related)
- Record
GHSA-f5x9-8jwc-25rw- CVSS 4.0
- 7.1 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-248, CWE-362
- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:12346-1 No score
python310-waitress-2.1.2-3.1 on GA media
These are all security issues fixed in the python310-waitress-2.1.2-3.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:12346-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15108-1 No score
python311-waitress-3.0.2-1.4 on GA media
These are all security issues fixed in the python311-waitress-3.0.2-1.4 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15108-1- Updated
- 2026-11-02
OSVPYSEC-2022-205 No score
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.
- Record
PYSEC-2022-205- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
waitressPyPI |
2.1.0 up to 2.1.2 | 2.1.2 |
py3-waitressAlpine:v3.16 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.17 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.18 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.19 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.20 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.21 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.22 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.23 |
before 2.1.2-r0 | 2.1.2-r0 |
py3-waitressAlpine:v3.24 |
before 2.1.2-r0 | 2.1.2-r0 |
Show 7 moreShow less
| Package | Affected | Fixed |
|---|---|---|
python-waitressAzure Linux:2 |
through 1.4.4-7 | None known |
python-waitressAzure Linux:3 |
before 3.0.1-1 | 3.0.1-1 |
waitressDebian:12 |
before 2.1.2-1 | 2.1.2-1 |
waitressDebian:13 |
before 2.1.2-1 | 2.1.2-1 |
waitressDebian:14 |
before 2.1.2-1 | 2.1.2-1 |
waitressPyPI |
2.1.0 up to 2.1.2, plus listed versions 2.1.1 |
2.1.2 |
python-waitressopenSUSE:Tumbleweed From an advisory covering 2 CVEs |
before 3.0.2-1.4 | 3.0.2-1.4 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| affected, aliases, references | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-31015 is a medium vulnerability (CVSS 6.5) in Agendaless Waitress, published May 31, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.50%, the 74th percentile. Fixed in waitress 2.1.2.
References
github.com/Pylons/waitress/security/advisories/GHSA-f5x9-8jwc-25rw
github.com/Pylons/waitress/issues/374
github.com/Pylons/waitress/pull/377
github.com/Pylons/waitress/commit/4f6789b035610e0552738cdc4b35ca809a592d48
nvd.nist.gov/vuln/detail/CVE-2022-31015
github.com/pypa/advisory-database/tree/main/vulns/waitress/PYSEC-2022-205.yaml
Show 8 moreShow less
github.com/advisories/GHSA-f5x9-8jwc-25rw
security.alpinelinux.org/vuln/CVE-2022-31015
github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31015.json
security-tracker.debian.org/tracker/CVE-2022-31015
github.com/Pylons/waitress
suse.com/security/cve/CVE-2022-31015
lists.opensuse.org/archives/list/[email protected]/thread/6Q3O22UMHKQ3MPP3ZUQNRRPVZ4GVNVON
suse.com/security/cve/CVE-2022-24761