CVE-2021-32640: ReDoS in Sec-Websocket-Protocol header

Published May 25, 2021
·
Updated

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 (

Affected Software

4 affected components
Ws Project Ws Node.js>=5.0.0<6.2.2
Ws Project Ws Node.js>=7.0.0<7.4.6
NetApp E-series Performance Analyzer
IBM Concert Software<=1.0-3.0.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ws to a version that resolves this vulnerability.

    Fixed in 7.4.6
  2. Configuration

    Reduce the maximum allowed length of request headers using the --max-http-header-size=size CLI option and/or the maxHeaderSize server option.

    Node.js HTTP server --max-http-header-size / maxHeaderSize = reduced maximum allowed request-header length

Event History

May 25, 2021
CVE Published
via MITRE·06:25 PM
Data Sourced
via MITRE·06:25 PM
DescriptionSeverityWeakness
Oct 14, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is CVE-2021-32640?

CVE-2021-32640 is a vulnerability in the ws library for Node.js that allows a specially crafted value of the `Sec-Websocket-Protocol` header to slow down a ws server.

2

What software is affected by CVE-2021-32640?

The ws library versions 5.0.0 to 6.2.2 and versions 7.0.0 to 7.4.6 for Node.js are affected. Additionally, the Netapp E-series Performance Analyzer is also affected.

3

What is the severity of CVE-2021-32640?

CVE-2021-32640 has a severity level of 5.3 (medium).

4

How can I fix CVE-2021-32640?

To fix CVE-2021-32640, you should update the ws library to version 7.4.6 or higher for Node.js.

5

Where can I find more information about CVE-2021-32640?

You can find more information about CVE-2021-32640 in the references provided: [link 1](https://github.com/websockets/ws/commit/00c425ec77993773d823f018f64a5c44e17023ff), [link 2](https://github.com/websockets/ws/security/advisories/GHSA-6fc8-4gx4-v693), [link 3](https://lists.apache.org/thread.html/rdfa7b6253c4d6271e31566ecd5f30b7ce1b8fb2c89d52b8c4e0f4e30@%3Ccommits.tinkerpop.apache.org%3E).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203