CVE Tools

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.

Check it yourself

No ready-made check. Neither Nuclei nor OpenVAS has one for this CVE yet.

Request a scan

Published Updated Sources: CVE.org, NVD, GitHub, BDU

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.

EPSS88th
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.

  1. Patch availableworkaround available, record updated
  2. Publishedweakness classified, att&ck mapped

Affected products

Technical detail

CVSS: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

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

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.