CVE-2021-32640
MEDIUM 5.3CVSS 3.1ReDoS in Sec-Websocket-Protocol header
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 and/or the maxHeaderSize options.
- Published
- 25 May 2021
- Last modified
- 8 Jul 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-345CWE-400
- Also known as
- GHSA-6fc8-4gx4-v693
- Sources
- NVDJSONOSV GHSA-6fc8-4gx4-v693JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | ws_project | wscpe:2.3:a:ws_project:ws:*:*:*:*:*:node.js:*:* |
>= 5.0.0, < 6.2.2 | 6.2.2 |
| NVD | ws_project | wscpe:2.3:a:ws_project:ws:*:*:*:*:*:node.js:*:* |
>= 7.0.0, < 7.4.6 | 7.4.6 |
| NVD | netapp | e-series_performance_analyzercpe:2.3:a:netapp:e-series_performance_analyzer:-:*:*:*:*:*:*:* |
(no version) | |
| OSV | npm | ws | >= 7.0.0, < 7.4.6 | 7.4.6 |
| OSV | npm | ws | >= 6.0.0, < 6.2.2 | 6.2.2 |
| OSV | npm | ws | >= 5.0.0, < 5.2.3 | 5.2.3 |
References
- https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff · Patch, Third Party Advisory, WEB
- https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693 · Exploit, Mitigation, Patch, Third Party Advisory, WEB
- https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30%40%3Ccommits.tinkerpop.apache.org%3E
- https://security.netapp.com/advisory/ntap-20210706-0005/ · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-32640 · ADVISORY
- https://github.com/websockets/ws/issues/1895 · WEB
- https://github.com/websockets/ws · PACKAGE
- https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30@%3Ccommits.tinkerpop.apache.org%3E · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 25 May 2021)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 28 May 2021)