CVE-2021-32640
May 25, 2021
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.
Affected Packages
ws (NPM):
Affected version(s) >=7.0.0 <7.4.6Fix Suggestion:
Update to version 7.4.6ws (NPM):
Affected version(s) >=6.0.0 <6.2.2Fix Suggestion:
Update to version 6.2.2ws (NPM):
Affected version(s) >=5.0.0 <5.2.3Fix Suggestion:
Update to version 5.2.3Additional Notes
The description of this vulnerability differs from MITRE.
Related Resources (9)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
NONE
Vulnerable System Availability
LOW
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
LOW
CVSS v2
Base Score:
5.0
Access Vector
NETWORK
Access Complexity
LOW
Authentication
NONE
Confidentiality Impact
NONE
Integrity Impact
NONE
Availability Impact
PARTIAL
Weakness Type (CWE)
EPSS
Base Score:
0.5