CVEMETERBack to radar
OFFICIAL RECORD · JavaScript packages

CVE-2021-32640

PUBLISHEDOfficial status check: verifiedCVSS 3.1: 5.3 · medium

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

FieldStatusChecked at (UTC)Source
kevverified2026-11-19T16:57:41.748ZCISA KEV
cvssverified2026-11-19T12:55:58.633ZCVE Program
epssverified2026-11-19T16:04:30.739ZFIRST EPSS
patchesverified2026-11-19T12:52:28.625ZOSV
affectedverified2026-11-19T12:55:58.633ZCVE Program
lifecycleverified2026-11-19T12:55:58.633ZCVE 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 JSON
OSV · 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 JSON

Correction 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 typeDistribution / releasePackageChannelVersion or source noteSource
ecosystem-boundarynpm / packagewsNot a distribution channel7.4.6Official record
ecosystem-boundarynpm / packagewsNot a distribution channel6.2.2Official record
ecosystem-boundarynpm / packagewsNot a distribution channel5.2.3Official record

Vendor notices and operational guidance

No connected vendor notice is available for this record.

Original sources and dates

Official status history