CVE-2021-32640
ReDoS in Sec-Websocket-Protocol header
CVE-2021-32640 is a resource exhaustion in Websockets Ws (CVSS 5.3, Medium).
No known exploitation. EPSS puts it in the 88th percentile. Fixed versions are out.
No public exploit knownFix5 products2 fixed builds listed below
No ready-made check. Neither Nuclei nor OpenVAS has one for this CVE yet.
What to do
Find your product and version, then upgrade to the build on the right.
- Websockets WsAffected: >= 5.0.0 <= 7.4.5Upgrade to: not statedStated by: CVE record
- Npm WsAffected: ≥ 7.0.0, < 7.4.6Upgrade to: 7.4.6Stated by: GitHub advisory
- Ws Project WsAffected: ≥ 5.0.0, < 6.2.2Upgrade to: 6.2.2Stated by: NVD
- Open-source community Debian GNU/LinuxAffected: 9Upgrade to: not statedStated by: BDU
- OpenJS Foundation wsAffected: from 5.0.0 before 6.2.2Upgrade to: not statedStated by: BDU
Versions as the sources state them. Full version matrix after sign-in
What it is
From the CVE record
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.
In plain language
No plain-language summary for this CVE yet.
Exploitation
Where each signal puts this CVE on the scale from published to confirmed exploited.
- CISA KEV
Not in the catalog. CISA has not confirmed exploitation.
- Public exploits
No public exploit or proof of concept found in the sources we track.
- EPSS
2.9% chance of exploitation activity in the next 30 days, which ranks it in the 88th percentile of scored CVEs.
Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.
Lifecycle
6 events over 1276 days, from the signal feeds we watch.
- Patch availableworkaround available, record updated
- Publishedweakness classified, att&ck mapped
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Scored 5.3 by NVD.
How it is reached
- Attack Vector NetworkExploitable remotely over the network without any special conditions
- Attack Complexity LowNo special conditions — the attack can be reliably reproduced
- Privileges Required NoneNo authentication required — anyone can exploit this
- User Interaction NoneNo user interaction needed — fully automated exploitation
Scope
- Scope UnchangedImpact is limited to the vulnerable component itself
Impact if exploited
- Confidentiality NoneNo confidentiality impact
- Integrity NoneNo integrity impact
- Availability LowReduced performance or intermittent disruption of service
Weaknesses
ATT&CK techniques
Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.
Sources
References in the record
- github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693
- github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff
- lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30%40%3Ccommits.tinkerpop.apache.org%3E
And 10 more references. See all after sign-in
Questions about CVE-2021-32640
- Is CVE-2021-32640 being exploited?
- No exploitation is confirmed and no public exploit is known. EPSS puts the chance of exploitation in the next 30 days at 2.9%.
- Which versions are affected by CVE-2021-32640?
- Ws: >= 5.0.0 <= 7.4.5. Ws: ≥ 7.0.0, < 7.4.6. Ws: ≥ 5.0.0, < 6.2.2. 2 more products are listed in the record.
- How do I fix or mitigate CVE-2021-32640?
- Upgrade to a fixed build for your product branch: 7.4.6, 6.2.2. The advisory is on github.com.
Last updated
Related articles
All articles- Three Actively-Exploited Zero-Days Hit Citrix NetScaler in Eleven Days. One Was Running Since Early September.
- A January Oracle Patch Just Got a 72-Hour Federal Deadline — Here's What Happened in Between
- A Trailing Dot Broke Visual Studio Copilot's Guardrails. Microsoft Fixed the 8.8 RCE and Paid the Researcher $0.
Watch the software you run.
My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.
We'll flag the next CVE, public exploit or patch for Ws, not every advisory.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI