CVE catalog

CVE-2021-32640

node-ws: CVE-2021-32640

[CVE catalog]

Severity
Medium · CVSS 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Published
Source
[NVD] · [CVE record]
EPSS
2.82% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiannode-wssid8.21.3+~cs14.19.1-1fixed
Debiannode-wsforky8.21.3+~cs14.19.1-1fixed
Debiannode-wstrixie8.18.1+~cs14.18.2-1fixed
Debiannode-wsbookworm8.11.0+~cs13.7.3-1fixed
Ubuntunode-ws16.040.7.2+ds1.349b7460-1vulnerable
Ubuntunode-ws16.041.0.1+ds1.e6ddaae4-1vulnerable
Ubuntunode-ws18.041.1.0+ds1.e6ddaae4-3build1vulnerable
Ubuntunode-ws18.041.1.0+ds1.e6ddaae4-3ubuntu1vulnerable
Ubuntunode-ws20.041.1.0+ds1.e6ddaae4-5vulnerable
Ubuntunode-ws20.047.2.1-2vulnerable
Ubuntunode-ws20.047.2.1-3vulnerable
Ubuntunode-ws22.047.4.2+~cs18.0.8-2vulnerable
Ubuntunode-ws22.047.5.5+~cs13.0.13-1vulnerable
Ubuntunode-ws22.048.5.0+~cs13.3.3-2vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannode-wssourcesid7.4.2+~cs18.0.8-2not yet assignedNot reportedNot reported
Debiannode-wssourceforky7.4.2+~cs18.0.8-2not yet assignedNot reportedNot reported
Debiannode-wssourcetrixie7.4.2+~cs18.0.8-2not yet assignedNot reportedNot reported
Debiannode-wssourcebookworm7.4.2+~cs18.0.8-2not yet assignedNot reportedNot reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [node-ws]Fixed
    Details (2)
    • 8.11.0+~cs13.7.3-1 · all · bookworm

      Fixed · Fixed: 7.4.2+~cs18.0.8-2

      dsa · node-ws · debian · bookworm; dsa · node-ws · debian · 12

    • 8.11.0+~cs13.7.3-1 · all · bookworm

      Fixed · Fixed: 7.4.2+~cs18.0.8-2

      dsa · node-ws · debian · bookworm; dsa · node-ws · debian · 12

[Debian 13 (Trixie)]

  • [node-ws]Fixed
    Details (2)
    • 8.18.1+~cs14.18.2-1 · all · trixie

      Fixed · Fixed: 7.4.2+~cs18.0.8-2

      dsa · node-ws · debian · 13

    • 8.18.1+~cs14.18.2-1 · all · trixie

      Fixed · Fixed: 7.4.2+~cs18.0.8-2

      dsa · node-ws · debian · 13

Observed:

References