CVE-2021-32640
ReDoS in Sec-Websocket-Protocol header
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 [email protected] (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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 2.821% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 5.3 · published by GitHub_MCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Assessment source · checked 2026-11-19T12:55:58.633Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:57:41.748Z | CISA KEV |
| cvss | verified | 2026-11-19T12:55:58.633Z | CVE Program |
| epss | verified | 2026-11-19T16:04:30.739Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:28.625Z | OSV |
| affected | verified | 2026-11-19T12:55:58.633Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:55:58.633Z | CVE Program |
Affected versions and configuration
websockets ws; default status: unknown: >= 5.0.0 <= 7.4.5 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "websockets",
"product": "ws",
"versions": [
{
"status": "affected",
"version": ">= 5.0.0 <= 7.4.5"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
},
{
"url": "https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30%40%3Ccommits.tinkerpop.apache.org%3E",
"name": "[tinkerpop-commits] 20210701 [tinkerpop] 01/03: Bumped ws to 6.2.2 to address CVE-2021-32640 CTR",
"tags": [
"mailing-list",
"x_refsource_MLIST",
"x_transferred"
]
},
{
"url": "https://security.netapp.com/advisory/ntap-20210706-0005/",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-03T23:25:31.019Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-6fc8-4gx4-v693",
"aliases": [
"CVE-2021-32640"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.4.6"
}
]
}
],
"package": {
"name": "ws",
"purl": "pkg:npm/ws",
"ecosystem": "npm"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-6fc8-4gx4-v693/GHSA-6fc8-4gx4-v693.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "6.0.0"
},
{
"fixed": "6.2.2"
}
]
}
],
"package": {
"name": "ws",
"purl": "pkg:npm/ws",
"ecosystem": "npm"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-6fc8-4gx4-v693/GHSA-6fc8-4gx4-v693.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "5.0.0"
},
{
"fixed": "5.2.3"
}
]
}
],
"package": {
"name": "ws",
"purl": "pkg:npm/ws",
"ecosystem": "npm"
},
"versions": [],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-6fc8-4gx4-v693/GHSA-6fc8-4gx4-v693.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32640",
"type": "ADVISORY"
},
{
"url": "https://github.com/websockets/ws/issues/1895",
"type": "WEB"
},
{
"url": "https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff",
"type": "WEB"
},
{
"url": "https://github.com/websockets/ws",
"type": "PACKAGE"
},
{
"url": "https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30@%3Ccommits.tinkerpop.apache.org%3E",
"type": "WEB"
},
{
"url": "https://security.netapp.com/advisory/ntap-20210706-0005",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-345",
"CWE-400"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2021-05-25T19:15:00Z",
"github_reviewed_at": "2021-05-28T18:18:04Z"
}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | npm / package | ws | Not a distribution channel | 7.4.6 | Official record |
| ecosystem-boundary | npm / package | ws | Not a distribution channel | 6.2.2 | Official record |
| ecosystem-boundary | npm / package | ws | Not a distribution channel | 5.2.3 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:52:28.625ZArchived source JSON
Source publication: 2021-05-28T19:19:03.000Z
Source modification: 2026-07-08T06:28:00.103ZDocument fingerprint
dc3201a19b0a98fc2f3597111339b544463a035fb3b41a6615e904426f7fb5cd - CVE ProgramConsulted: 2026-11-19T12:55:58.633ZArchived source JSON
Source publication: 2021-05-25T18:25:09.000Z
Source modification: 2024-08-03T23:25:31.019ZDocument fingerprint
905c6dc577243937ec49d67f9dba7a82d4bf7b3f08138c832ad06d00d8e62255 - CISA KEVConsulted: 2026-11-19T16:57:41.748ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:30.739ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
8b22e3d0bbbe22a3c52f8c688c42204480fc90c949431dad186ebe9ca81245a8
Official status history
- UNKNOWN → PUBLISHED · · evidence