ws vulnerabilities

Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js

Registry
npm
Latest
8.22.0
License
MIT

7 known advisories

The latest version, 8.22.0, is not affected by any of them. Projects on older versions may be.

Update to the latest version:npm install ws@8.22.0

Security advisories for ws

  • HighGHSA-96hv-2xvq-fx4p15 Jun 2026

    ws: Memory exhaustion DoS from tiny fragments and data chunks

    Affected
    >=1.1.0 <5.2.5 · >=6.0.0 <6.2.4 · >=7.0.0 <7.5.11 · >=8.0.0 <8.21.0
    Fixed in
    5.2.5, 6.2.4, 7.5.11, 8.21.0
  • MediumGHSA-58qx-3vcg-4xpx18 May 2026

    ws: Uninitialized memory disclosure

    Affected
    >=8.0.0 <8.20.1
    Fixed in
    8.20.1
  • HighGHSA-3h5v-q93c-6h6q17 Jun 2024

    ws affected by a DoS when handling a request with many HTTP headers

    Affected
    >=2.1.0 <5.2.4 · >=6.0.0 <6.2.3 · >=7.0.0 <7.5.10 · >=8.0.0 <8.17.1
    Fixed in
    5.2.4, 6.2.3, 7.5.10, 8.17.1
  • MediumGHSA-6fc8-4gx4-v69328 May 2021

    ReDoS in Sec-Websocket-Protocol header

    Affected
    >=7.0.0 <7.4.6 · >=6.0.0 <6.2.2 · >=5.0.0 <5.2.3
    Fixed in
    5.2.3, 6.2.2, 7.4.6
  • HighGHSA-5v72-xg48-5rpm4 Jun 2019

    Denial of Service in ws

    Affected
    >=0.6.0 <1.1.5 · >=2.0.0 <3.3.1
    Fixed in
    1.1.5, 3.3.1
  • HighGHSA-6663-c963-2gqg18 Feb 2019

    DoS due to excessively large websocket message in ws

    Affected
    <1.1.1
    Fixed in
    1.1.1
  • LowGHSA-2mhh-w6q8-5hxw18 Feb 2019

    Remote Memory Disclosure in ws

    Affected
    <1.0.1
    Fixed in
    1.0.1

Which of your client projects still run an old ws?

NPMscan reads the package-lock.json, yarn.lock and pnpm-lock.yaml in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other npm packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the npm registry.