{"answers":{"affected":"3 open source packages ship an affected version, including waitress. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31015 exists.","fix":"Upgrade waitress to 2.1.2 or later.","what":"CVE-2022-31015 is a medium-severity vulnerability in Pylons waitress, published on 31 May 2022. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31015 and fix it if it is affected.\n\nWhat it is: CVE-2022-31015 is a medium-severity vulnerability in Pylons waitress, published on 31 May 2022. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31015 exists.\n\nAffected packages and fixed versions:\n- waitress (PyPI): affected from 2.1.0; fixed in 2.1.2\n- waitress (PyPI): affected from 2.1.0; fixed in 2.1.2\n- waitress (PyPI): affected from 2.1.0; fixed in 2.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31015/ (Markdown: https://insights.sbomify.com/CVE-2022-31015/index.md)","id":"CVE-2022-31015","markdown":"https://insights.sbomify.com/CVE-2022-31015/index.md","name":"CVE-2022-31015","record":{"aliases":["AZL-43513","AZL-44571","DEBIAN-CVE-2022-31015","GHSA-f5x9-8jwc-25rw","PYSEC-2022-205","openSUSE-SU-2024:12346-1"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Python WSGI server","requires_auth":"low_privilege","summary":"A race condition in Waitress allows a thread to close a socket during select, causing an unhandled exception and terminating the server process.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"waitress","vendor":"agendaless"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-362","name":"Concurrent Execution using Shared Resource with Improper Synchronization"},{"id":"CWE-248","name":"Uncaught Exception"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Uncaught Exception (due to a data race) leads to process termination in Waitress","id":"CVE-2022-31015","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"race_condition","year":"2022"},"n_packages":3,"n_references":4,"next":{"headline":"Argo CD vulnerable to Uncontrolled Memory Consumption","id":"CVE-2022-31016"},"packages":[{"ecosystem":"PyPI","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"waitress","purl":null,"source":"GHSA-f5x9-8jwc-25rw"},{"ecosystem":"PyPI","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"waitress","purl":"pkg:pypi/waitress","source":"GHSA-f5x9-8jwc-25rw"},{"ecosystem":"PyPI","fixed":["2.1.2"],"introduced":["2.1.0"],"last_affected":[],"package":"waitress","purl":"pkg:pypi/waitress","source":"PYSEC-2022-205"}],"prev":{"headline":"SMTP Command Injection in iCalendar Attachments to emails via newlines in Nextcloud Server","id":"CVE-2022-31014"},"products":["waitress"],"published":"2022-05-31","related":[{"cvss_score":9.1,"headline":"Waitress has request processing race condition in HTTP pipelining with invalid first request","id":"CVE-2024-49768","kev_date_added":null,"published":"2024-10-29"},{"cvss_score":7.5,"headline":"Waitress has a denial of service leading to high CPU usage/resource exhaustion","id":"CVE-2024-49769","kev_date_added":null,"published":"2024-10-29"},{"cvss_score":7.5,"headline":"HTTP Request Smuggling in waitress","id":"CVE-2022-24761","kev_date_added":null,"published":"2022-03-17"},{"cvss_score":7.1,"headline":"HTTP Request Smuggling: Content-Length Sent Twice in Waitress","id":"CVE-2019-16792","kev_date_added":null,"published":"2020-01-22"},{"cvss_score":7.1,"headline":"HTTP Request Smuggling in Waitress: Invalid whitespace characters in headers","id":"CVE-2019-16789","kev_date_added":null,"published":"2019-12-26"},{"cvss_score":7.1,"headline":"HTTP Request Smuggling: LF vs CRLF handling in Waitress","id":"CVE-2019-16785","kev_date_added":null,"published":"2019-12-20"},{"cvss_score":7.1,"headline":"HTTP Request Smuggling: Invalid Transfer-Encoding in Waitress","id":"CVE-2019-16786","kev_date_added":null,"published":"2019-12-20"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-22","vendors":["Pylons"]},"summary":"A race condition in Waitress allows a thread to close a socket during select, causing an unhandled exception and terminating the server process.","url":"https://insights.sbomify.com/CVE-2022-31015/"}