Every CVE Search/ Get API key

CVE-2022-31015

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

6.5 MediumFix available

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

1.50%Up 0.5 points since Jun 1, 2022
90%50%10%1%

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 MediumCVSS: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 MediumCVSS: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:

Record
GHSA-f5x9-8jwc-25rw
CVSS 4.0
7.1 HighCVSS: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 MediumCVSS: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 MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
4.3 MediumAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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:

Record
GHSA-f5x9-8jwc-25rw
CVSS 4.0
7.1 HighCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
waitress
PyPI
2.1.0 up to 2.1.2
2.1.2
py3-waitress
Alpine:v3.16
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.17
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.18
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.19
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.20
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.21
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.22
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.23
before 2.1.2-r0
2.1.2-r0
py3-waitress
Alpine:v3.24
before 2.1.2-r0
2.1.2-r0
Show 7 moreShow less
Affected packages
PackageAffectedFixed
python-waitress
Azure Linux:2
through 1.4.4-7 None known
python-waitress
Azure Linux:3
before 3.0.1-1
3.0.1-1
waitress
Debian:12
before 2.1.2-1
2.1.2-1
waitress
Debian:13
before 2.1.2-1
2.1.2-1
waitress
Debian:14
before 2.1.2-1
2.1.2-1
waitress
PyPI
2.1.0 up to 2.1.2, plus listed versions
2.1.1
2.1.2
python-waitress
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 3.0.2-1.4
3.0.2-1.4

History

History
RecordedChangedSources
affected, factsOSV
affected, aliases, referencesOSV
first indexedCVE 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

Show 8 moreShow less
MoveEnter Open