cve.bz

CVE-2021-32640 Uncontrolled Resource Consumption

5.3 mediumExploit referenceEPSS 2.9%Fix available

Medium (5.3). EPSS 2.9% estimated probability of exploitation activity in the next 30 days. Fixed in ws 5.2.3, 6.2.2, 7.4.6.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS
2.9% (unchanged from 2.8% a week ago; 2.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 87th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-400 Uncontrolled Resource Consumption
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-32640 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-32640?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-32640?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-32640 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ws_project:wsfrom 5.0.0 before 6.2.2
ws_project:wsfrom 7.0.0 before 7.4.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-6fc8-4gx4-v693npmws>=7.0.0 <7.4.67.4.6
GHSA-6fc8-4gx4-v693npmws>=6.0.0 <6.2.26.2.2
GHSA-6fc8-4gx4-v693npmws>=5.0.0 <5.2.35.2.3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14node-ws7.4.2+~cs18.0.8-2DEBIAN-CVE-2021-32640
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 1 morenode-wsno fix listedUBUNTU-CVE-2021-32640
Azure Linux3js-jqueryno fix listedAZL-44670

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Low.

Red Hat's mitigation

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 and/or the maxHeaderSize options.

ProductPackageStateAdvisory
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
OpenShift Service Mesh 2.0servicemesh-prometheusAffected
Red Hat Advanced Cluster Management for Kubernetes 2mcm-topologyFix deferred
Red Hat Advanced Cluster Management for Kubernetes 2mcm-topology-apiFix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/application-ui-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-api-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-header-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/console-ui-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/grc-ui-api-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/grc-ui-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/kui-web-terminal-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-api-rhel8Fix deferred
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/search-ui-rhel8Fix deferred
Red Hat Ansible Automation Platform 1.2wsAffected
Red Hat OpenShift Container Platform 4openshift4/ose-consoleFix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-grafanaFix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-prometheusFix deferred
Red Hat OpenShift Container Platform 4openshift4/ose-thanos-rhel9Fix deferred
Red Hat Openshift Container Storage 4ocs4/mcg-core-rhel8Affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-32640.

Attack patterns (CAPEC)

  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement
  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON