Skip to main content
← All vulnerabilities
CVE-2021-32640GHSA-6FC8-4GX4-V693

ReDoS in Sec-Websocket-Protocol header

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 7.4.6, 6.2.2, 5.2.3
None on Exploit-DB, Metasploit or GitHub

Summary

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

Timeline

  1. CVE published
  2. Record last updated

Affected versions

  • websockets ws

    >= 5.0.0 <= 7.4.5

  • wsnpm

    From 7.0.0 · fixed in 7.4.6

  • wsnpm

    From 6.0.0 · fixed in 6.2.2

  • wsnpm

    From 5.0.0 · fixed in 5.2.3

References 4

GitHub · websockets/ws

lists.apache.org

security.netapp.com