{"answers":{"affected":"6 open source packages ship an affected version, including ws. It affects 2 products.","exploited":"There is no known exploitation of CVE-2021-32640 in the wild and no public exploit code.","fix":"Upgrade ws to a fixed version for your release line: 5.2.3, 6.2.2 or 7.4.6.","what":"CVE-2021-32640 is a medium-severity denial of service vulnerability in Netapp E-Series Performance Analyzer, published on 25 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32640 and fix it if it is affected.\n\nWhat it is: CVE-2021-32640 is a medium-severity denial of service vulnerability in Netapp E-Series Performance Analyzer, published on 25 May 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32640 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- ws (npm): affected from 5.0.0; fixed in 5.2.3\n- ws (npm): affected from 5.0.0; fixed in 5.2.3\n- ws (npm): affected from 6.0.0; fixed in 6.2.2\n- ws (npm): affected from 6.0.0; fixed in 6.2.2\n- ws (npm): affected from 7.0.0; fixed in 7.4.6\n- ws (npm): affected from 7.0.0; fixed in 7.4.6\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-2021-32640/ (Markdown: https://insights.sbomify.com/CVE-2021-32640/index.md)","id":"CVE-2021-32640","markdown":"https://insights.sbomify.com/CVE-2021-32640/index.md","name":"CVE-2021-32640","record":{"aliases":["AZL-44670","CLSA-2026-1785380875","DEBIAN-CVE-2021-32640","GHSA-6fc8-4gx4-v693","ROOT-APP-NPM-CVE-2021-32640","UBUNTU-CVE-2021-32640"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js WebSocket library","requires_auth":"none","summary":"A specially crafted Sec-Websocket-Protocol header can cause significant slowdowns in ws servers, leading to denial of service.","user_interaction":"not_required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"e-series_performance_analyzer","vendor":"netapp"},{"product":"ws","vendor":"ws_project"}],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","version":"3.1"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"description":"ws is an open source WebSocket client and server library for Node.js. A specially crafted value of the `Sec-Websocket-Protocol` header can be used to significantly slow down a ws server. The vulnerability has been fixed in ws@7.4.6 (https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff). In vulnerable versions of ws, the issue can be mitigated by reducing the maximum allowed length of the request headers using the [`--max-http-header-size=size`](https://nodejs.org/api/cli.html#cli_max_http_header_size_size) and/or the [`maxHeaderSize`](https://nodejs.org/api/http.html#http_http_createserver_options_requestlistener) options.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ReDoS in Sec-Websocket-Protocol header","id":"CVE-2021-32640","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":"netapp:e-series_performance_analyzer","products":["netapp:e-series_performance_analyzer"],"type":"denial_of_service","year":"2021"},"n_packages":6,"n_references":4,"next":{"headline":"Reflected XSS when using flashMessages","id":"CVE-2021-32641"},"packages":[{"ecosystem":"npm","fixed":["5.2.3"],"introduced":["5.0.0"],"last_affected":[],"package":"ws","purl":null,"source":"GHSA-6fc8-4gx4-v693"},{"ecosystem":"npm","fixed":["5.2.3"],"introduced":["5.0.0"],"last_affected":[],"package":"ws","purl":"pkg:npm/ws","source":"GHSA-6fc8-4gx4-v693"},{"ecosystem":"npm","fixed":["6.2.2"],"introduced":["6.0.0"],"last_affected":[],"package":"ws","purl":null,"source":"GHSA-6fc8-4gx4-v693"},{"ecosystem":"npm","fixed":["6.2.2"],"introduced":["6.0.0"],"last_affected":[],"package":"ws","purl":"pkg:npm/ws","source":"GHSA-6fc8-4gx4-v693"},{"ecosystem":"npm","fixed":["7.4.6"],"introduced":["7.0.0"],"last_affected":[],"package":"ws","purl":null,"source":"GHSA-6fc8-4gx4-v693"},{"ecosystem":"npm","fixed":["7.4.6"],"introduced":["7.0.0"],"last_affected":[],"package":"ws","purl":"pkg:npm/ws","source":"GHSA-6fc8-4gx4-v693"}],"prev":{"headline":"Server-Side Request Forgery (SSRF) in emissary:emissary","id":"CVE-2021-32639"},"products":["ws"],"published":"2021-05-25","related":[{"cvss_score":7.5,"headline":"Regular Expression Denial-of-Service in npm schema-inspector","id":"CVE-2021-21267","kev_date_added":null,"published":"2021-03-19"}],"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":"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":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["websockets"]},"summary":"A specially crafted Sec-Websocket-Protocol header can cause significant slowdowns in ws servers, leading to denial of service.","url":"https://insights.sbomify.com/CVE-2021-32640/"}