{"schemaVersion":3,"id":"CVE-2021-32640","aliases":["UBUNTU-CVE-2021-32640","DEBIAN-CVE-2021-32640","GHSA-6fc8-4gx4-v693"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2021-05-25T18:25:09.000Z","modified":"2024-08-03T23:25:31.019Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.3,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5,"severity":"medium","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.02821,"percentile":0.8638,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.02821},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02821,"percentile":0.8638}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.02821,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.02821,"percentile":0.8638}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_WEBSOCKETS_WS","name":"Ws","source":"github","url":"https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption","description":"The product does not properly control the allocation and maintenance of a limited resource.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/400.html"}],"affected":[{"vendor":"debian","product":"node-ws","name":"node-ws","label":"node-ws","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/node-ws","purlType":"deb","versions":[{"text":"< 7.4.2+~cs18.0.8-2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 7.4.2+~cs18.0.8-2","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"node-ws","name":"node-ws","label":"node-ws","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/node-ws","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"netapp","product":"e-series_performance_analyzer","name":"e-series performance analyzer","label":"e-series_performance_analyzer","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"na","noFixRecorded":false,"fixedIn":null}],"versionsText":"na","eol":null,"hubHref":"/vendor/netapp/e-series_performance_analyzer"},{"vendor":"Npm","product":"ws","name":"ws","label":"ws","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/ws","purlType":"npm","versions":[{"text":"≥ 7.0.0, < 7.4.6","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.0.0, < 6.2.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 5.0.0, < 5.2.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 7.0.0, < 7.4.6 | ≥ 6.0.0, < 6.2.2 | ≥ 5.0.0, < 5.2.3","eol":null,"hubHref":null},{"vendor":"websockets","product":"ws","name":"ws","label":"ws","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 5.0.0 <= 7.4.5","noFixRecorded":true,"fixedIn":null}],"versionsText":"≥ 5.0.0 <= 7.4.5 (No fix recorded)","eol":null,"hubHref":"/vendor/websockets/ws"},{"vendor":"ws_project","product":"ws","name":"ws","label":"ws","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 5.0.0, < 6.2.2","noFixRecorded":false,"fixedIn":null},{"text":"≥ 7.0.0, < 7.4.6","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 5.0.0, < 6.2.2 | ≥ 7.0.0, < 7.4.6","eol":null,"hubHref":"/vendor/ws_project/ws"}],"affectedCount":6,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693","label":"github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693","hostname":"github.com","tags":["X Refsource CONFIRM","REPORT","WEB","Exploit","Mitigation","Patch","Third Party Advisory"]},{"url":"https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff","label":"github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff","hostname":"github.com","tags":["X Refsource MISC","REPORT","WEB","Patch","Third Party Advisory"]},{"url":"https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30%40%3Ccommits.tinkerpop.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["Mailing List","X Refsource MLIST"]},{"url":"https://security.netapp.com/advisory/ntap-20210706-0005/","label":"security.netapp.com/advisory/ntap-20210706-0005/","hostname":"security.netapp.com","tags":["X Refsource CONFIRM","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2021-32640","label":"ubuntu.com/security/CVE-2021-32640","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-32640","label":"www.cve.org/CVERecord?id=CVE-2021-32640","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-32640","label":"security-tracker.debian.org/tracker/CVE-2021-32640","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32640","label":"nvd.nist.gov/vuln/detail/CVE-2021-32640","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/websockets/ws/issues/1895","label":"github.com/websockets/ws/issues/1895","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/websockets/ws","label":"github.com/websockets/ws","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30@%3Ccommits.tinkerpop.apache.org%3E","label":"lists.apache.org/thread.html/…","hostname":"lists.apache.org","tags":["WEB"]},{"url":"https://security.netapp.com/advisory/ntap-20210706-0005","label":"security.netapp.com/advisory/ntap-20210706-0005","hostname":"security.netapp.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-05-25T18:25:09.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T23:25:31.019Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":32,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T03:12:06.045Z","stale":false,"partial":false}}