ReDoS in Sec-Websocket-Protocol header
cve-program · CVE-2021-32640
Publishedws 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.
Read the publisher's advisoryeuvd · EUVD-2021-0968
Publishedws 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.
Read the publisher's advisorynvd · CVE-2021-32640
Publishedws 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.
Read the publisher's advisoryosv · GHSA-6fc8-4gx4-v693
Published### Impact A specially crafted value of the `Sec-Websocket-Protocol` header can be used to significantly slow down a ws server. ### Proof of concept ```js for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) { const value = 'b' + ' '.repeat(length) + 'x'; const start = process.hrtime.bigint(); value.trim().split(/ *, */); const end = process.hrtime.bigint(); console.log('length = %d, time = %f ns', length, end - start); } ``` ### Patches The vulnerability was fixed in [email protected] (https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff) and backported to [email protected] (https://github.com/websockets/ws/commit/78c676d2a1acefbc05292e9f7ea0a9457704bf1b) and [email protected] (https://github.com/websockets/ws/commit/76d47c1479002022a3e4357b3c9f0e23a68d4cd2). ### Workarounds 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. ### Credits The vulnerability was responsibly disclosed along with a fix in private by [Robert McLaughlin](https://github.com/robmcl4) from University of California, Santa Barbara.
Read the publisher's advisoryAffected versions, risk and source history
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2021-32640
PublishedReDoS 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 [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.
- Source published
- 25 May 2021 18:25:09 UTC
- Source modified
- 3 Aug 2024 23:25:31 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
euvd · EUVD-2021-0968
Publishedws 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:/…
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.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: May 25, 2021, 6:25:09 PM
dateUpdated: Aug 3, 2024, 11:25:31 PM
2 related source bulletins · separate from aliases
WID-SEC-W-2026-2948: HCL BigFix AEX: Schwachstelle ermöglicht Denial of Service
CVE-2021-32640
RHSA-2026:100741: Red Hat Security Advisory: Red Hat OpenShift Data Foundation 5.0.0 security, enhancement & bug fix update
CVE-2017-16137 · CVE-2020-7598 · CVE-2020-7608 · CVE-2020-7610 · CVE-2020-7788 · CVE-2020-8203 · CVE-2020-8237 · CVE-2020-15168 · CVE-2020-15366 · CVE-2020-28500 · CVE-2021-3807 · CVE-2021-23337 · CVE-2021-23343 · CVE-2021-32640 · CVE-2021-32804 · CVE-2021-37701 · CVE-2021-37712 · CVE-2021-37713 · CVE-2021-43138 · CVE-2021-44906 · CVE-2022-0235 · CVE-2022-3517 · CVE-2022-23539 · CVE-2022-23540 · CVE-2022-23541 · CVE-2022-24785 · CVE-2022-24999 · CVE-2022-25883 · CVE-2022-31129 · CVE-2023-0842 · CVE-2023-45133 · CVE-2024-21538 · CVE-2024-28863 · CVE-2024-29041 · CVE-2024-37890 · CVE-2024-43796 · CVE-2024-43799 · CVE-2024-43800 · CVE-2024-45296 · CVE-2024-45590 · CVE-2024-47764 · CVE-2024-52798 · CVE-2025-5889 · CVE-2025-7339 · CVE-2025-7783 · CVE-2025-8766 · CVE-2025-13465 · CVE-2025-64718 · CVE-2025-65945 · CVE-2025-69873 · CVE-2026-2391 · CVE-2026-2950 · CVE-2026-4800 · CVE-2026-4867 · CVE-2026-12143 · CVE-2026-12590 · CVE-2026-13149 · CVE-2026-23745 · CVE-2026-23950 · CVE-2026-24842 · CVE-2026-26960 · CVE-2026-26996 · CVE-2026-27903 · CVE-2026-27904 · CVE-2026-29786 · CVE-2026-31802 · CVE-2026-33532 · CVE-2026-33750 · CVE-2026-48779 · CVE-2026-53550 · CVE-2026-53655 · CVE-2026-56851 · CVE-2026-59869 · CVE-2026-59871 · CVE-2026-59873 · CVE-2026-59874 · CVE-2026-59875 · CVE-2026-61801 · CVE-2026-69152 · CVE-2026-73566 · CVE-2026-82417 · CVE-2026-84304 · CVE-2026-84375 · CVE-2026-87776 · CVE-2026-90711 · CVE-2026-102276 · CVE-2026-102277 · CVE-2026-102278
- Source published
- May 25, 2021, 6:25:09 PM (timezone not stated)
- Source modified
- Aug 3, 2024, 11:25:31 PM (timezone not stated)
- Saved here
- 24 Nov 2026 03:35:16 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
nvd · CVE-2021-32640
Publishedws 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:/…
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.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-400
Original publisher date fields
published: 2021-05-25T19:15:07.767
lastModified: 2026-06-17T03:53:19.733
2 source CPE criteria · context only
- cpe:2.3:a:ws_project:ws:*:*:*:*:*:node.js:*:*
- cpe:2.3:a:netapp:e-series_performance_analyzer:-:*:*:*:*:*:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 25 May 2021 19:15:07 UTC
- Source modified
- 17 Jun 2026 03:53:19 UTC
- Saved here
- 24 Oct 2026 18:17:28 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS 3.1 · [email protected] · Primary · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS 2.0 · [email protected] · Primary · 5.0 AV:N/AC:L/Au:N/C:N/I:N/A:P
osv · GHSA-6fc8-4gx4-v693
PublishedReDoS in Sec-Websocket-Protocol header
### Impact A specially crafted value of the `Sec-Websocket-Protocol` header can be used to significantly slow down a ws server. ### Proof of concept ```js for (const length of [1000, 2000, 4000, 8000, 16000, 32000]) { const value = 'b' + ' '.repeat(length) + 'x'; const start = process.hrtime.bigint(); value.trim().split(/ *, */); const end = process.hrtime.bigint(); console.log('length = %d, time = %f ns', length, end - start); } ``` ### Patches The vulnerability was fixed in [email protected] (https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff) and backported to [email protected] (https://github.com/websockets/ws/commit/78c676d2a1acefbc05292e9f7ea0a9457704bf1b) and [email protected] (https://github.com/websockets/ws/commit/76d47c1479002022a3e4357b3c9f0e23a68d4cd2). ### Workarounds 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. ### Credits The vulnerability was responsibly disclosed along with a fix in private by [Robert McLaughlin](https://github.com/robmcl4) from University of California, Santa Barbara.
- Source published
- 28 May 2021 19:19:03 UTC
- Source modified
- 8 Jul 2026 06:28:00 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher rating · MODERATE