CVE-2021-32640ReDoS in Sec-Websocket-Protocol header
- 5.3MediumCVSS base score
- 2.8%Exploitation in 30 daysEPSS · top 13% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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 [email protected] (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.
Timeline
ID reserved
By GitHub_M
- 13 days later
· 13 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| NVDNVD · Modified | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
- EPSS (exploitation in 30 days)
- 2.8% · top 13% of all CVEs (15 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.3.
Affected products
websockets · ws
- affected >= 5.0.0 <= 7.4.5
Affected packages
From reviewed advisories of the GitHub Advisory Database.
References
References4
- https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff (opens in a new tab)x_refsource_MISCx_transferred
- [tinkerpop-commits] 20210701 [tinkerpop] 01/03: Bumped ws to 6.2.2 to address CVE-2021-32640 CTR (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- https://security.netapp.com/advisory/ntap-20210706-0005/ (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0968 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-6fc8-4gx4-v693 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-32640)Record last updated .